YouGroove Posted April 3, 2014 Share Posted April 3, 2014 It is possible to modify LE3 normal map shader to use diffuse texture as a detail texture, i mean with UV scaled down by some factor ? As example the clothes : Quote Stop toying and make games Link to comment Share on other sites More sharing options...
shadmar Posted April 3, 2014 Share Posted April 3, 2014 Yes, something like this (not tested for typos): Add to the top : //uniforms uniform sampler2D texture4;//details map Then find : outcolor *= texture(texture0,ex_texcoords0); After add : outcolor *= texture(texture4,ex_texcoords0*4.0); //detail texture uv scaled by 4 2 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
tjheldna Posted April 4, 2014 Share Posted April 4, 2014 Thanks Shadmar, I was actually just thinking about this last night. Must have read my mind or something. I'll test it tonight no doubt. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted April 6, 2014 Author Share Posted April 6, 2014 I tested , it seems to work, but not sure as there is some color problem. On exemple image texture was rock brown, but shader turned it with blue coloring ? Shader file attached if someone want to test. diffuseDetail +normal.zip Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rastar Posted April 6, 2014 Share Posted April 6, 2014 Shadmar's code expects a dffuse detail texture in the "Texture 4" slot, which is empty in your screenshot. If you want to use the base diffuse for this, change the code to outcolor *= texture(texture0, ex_texcoords0*4.0); EDIT: I probably misunderstood your setup... You want to use the cliff texture as the detail texture, right? And in your screenshot, are you using shadmar's code for that very texture? 2 Quote Link to comment Share on other sites More sharing options...
YouGroove Posted April 6, 2014 Author Share Posted April 6, 2014 outcolor *= texture(texture0, ex_texcoords0*4.0); Yes it was that, and it worked, thanks. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
shadmar Posted April 6, 2014 Share Posted April 6, 2014 Kind of dark, might wanna use mix instead. outcolor = mix(texture(texture0, ex_texcoords0),texture(texture0, ex_texcoords0*4.0),0.5); Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB 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.