Skip to content

Adds Texture Upload and Custom Uniforms #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

alexottoboni
Copy link
Contributor

@alexottoboni alexottoboni commented Dec 20, 2016

Users can upload custom textures to apply to their models. They can also
add custom Uniform variables that are float, int, bools, vec2, vec3, vec4,
or sampler2D.

After a texture is uploaded it can be accessed by specifying the filename in
the uniforms tab. In the default text for Uniform there is a default texture
specified as sampler2D my_texture = "textures/beanie.jpg";

If a custom uploaded model has UV coordinates, then they can be used to map the texture to the model.

There is a new snippet showing how to apply a texture that is available
in the Uniforms tab.

The uniforms tab now highlights parsing errors.

Draw distance is increased.

When Shdr is opened the pause/play button shows play instead of pause.

I took the beanie texture picture, MIT license. If someone has a better default texture we can use that instead.

@atran67
@josepharhar
screen shot 2016-12-20 at 3 37 20 pm

Alex Ottoboni and others added 28 commits December 10, 2016 17:32
Custom model files can be uploaded by the user from an additional
menu bar item. They will appear in the dropdown model selection list and
can be selected like any other model. Once the user refreshes the page
the user provided models will no longer be available.

This pull also includes josepharhar's build.js, package.json, gitignore, and
README changes. It made it much easier to work with this project since the
generated JS files don't need to be manually modified and it is easier to build
the project by simply running `npm install` then `npm start`.

If he likes I can remove those changes from this pull and he can submit them
seperately.

Working with
Vec4 parse code was broken. Fixed now. Added some syntax error messages for uniform assignment.
Users can upload custom textures to apply to their models. They can also
add custom Uniform variables that are float, int, bools, vec2, vec3, vec4,
or sampler2d.

After a texture is uploaded it can be accessed by specifying the filename in
the uniforms tab. In the default text for Uniform there is a default texture
specified as `sampler2D my_texture = "textures/beanie.jpg";`

There is a new snippet showing how to apply a texture that is available
in the Uniforms tab.

The uniforms tab now highlights parsing errors.
@BKcore
Copy link
Owner

BKcore commented Dec 23, 2016

Thanks for submitting this.
I'm in vacation until January, so I'll review this when I get back.
Happy holidays!

@obuhhh
Copy link

obuhhh commented Aug 25, 2019

@BKcore, Hey! So, how your vacation? Are you alive? :D
Can you merge this pretty PR?

@oktomus
Copy link

oktomus commented Feb 2, 2020

Up :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants