Material shader for Texture
Hi,
I would like to apply to a gl.mesh's texture (it could be a videoplane texture too !) materials shader (mat.glass,…)
I've tried to bind the texture and set sampler2DRect…
But I'm pretty newbie in gl.shader…
Any help would be pretty appreciated.
Thx.
Ad.
something like this?
Thank you for your response;
If i use your code as a single shader, it gives nothing else than a back sea !
Is this more like a program that I would have to bind in the futures shaders ?
Ad.
a few issues with the shader.
a single texture parameter should be bound to int 0, not int 1 (assuming you only have one texture bound).
second, for rectangular textures you're going to want to multiply the texcoord by the gl_TextureMatrix before sending to the fragment shade.
here's modified shader code and a simple test patch:
save as simple.jxs:
test patch
Good one rob!
Is the previous example working with sampler2D?