Shdr icon indicating copy to clipboard operation
Shdr copied to clipboard

Adds Texture Upload and Custom Uniforms

Open alexottoboni opened this issue 7 years ago • 3 comments

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

alexottoboni avatar Dec 20 '16 23:12 alexottoboni

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

BKcore avatar Dec 23 '16 15:12 BKcore

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

obuhhh avatar Aug 25 '19 13:08 obuhhh

Up :)

oktomus avatar Feb 02 '20 12:02 oktomus