YouGroove Posted May 19, 2013 Share Posted May 19, 2013 Like that lava : It is possible on models, i dind't find it on documentation ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Admin Posted May 19, 2013 Share Posted May 19, 2013 This can be easily done with a shader. Declare a uniform in the fragment shader like this: uniform float currenttime; Then use that to modify your texture coordinates: texcoords.y += currenttime/100.0; 1 Quote Link to comment Share on other sites More sharing options...
tjheldna Posted June 24, 2013 Share Posted June 24, 2013 Sorry I'm trying to get this working and I'm a shader noob which is a bad combo.... //Uniforms uniform sampler2D texture0;//diffuse map uniform float currenttime; //Inputs varying vec2 ex_texcoords0; varying vec2 ex_texcoords1; varying vec4 ex_color; varying float ex_selectionstate; void main(void) { vec2 texcoords = ex_texcoords0; texcoords.y += currenttime/100.0; vec4 outcolor = ex_color; //Modulate blend with diffuse map outcolor *= texture2D(texture0,ex_texcoords0); //Blend with selection color if selected gl_FragColor = outcolor; } Obviously it's not working, am I on the right track? Any clues on how to get it working? Any help would be appreciated! Cheers! Quote Link to comment Share on other sites More sharing options...
shadmar Posted June 24, 2013 Share Posted June 24, 2013 Just change : outcolor *= texture2D(texture0,ex_texcoords0); to outcolor *= texture2D(texture0,texcoords); 1 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
tjheldna Posted June 24, 2013 Share Posted June 24, 2013 F^ yeah! Thanks Shadmar! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.