Bump with detail?

Posted By: Dooley

Bump with detail? - 04/05/18 21:42

Is there a bump map shader that also allows for a detail map?
Posted By: Steempipe

Re: Bump with detail? - 08/03/18 01:06

Do you have an example of what you're looking to do?
Posted By: Dooley

Re: Bump with detail? - 09/26/18 03:27

Sorry, I did not check here for a while.

I guess I don't have an example. Just wondering if any bump map shaders allow for adding a detail texture. So you would get a bump effect from the main texture, but when you look up close you could also see a higher resolution detail map. It would be for terrain.
Posted By: Superku

Re: Bump with detail? - 09/26/18 13:16

You can just write it yourself. Take this normal mapping shader from the tutorial as a basis: http://www.conitec.net/shaders/shader_work4.htm

Add a third sampler that either references entSkin3 as a texture or some script BMAP via the _bmap feature.

In the pixel shader, sample your DetailMapSampler like this:
float Detail = tex2D(DetailMapSampler, InTex*8).r; // we only take the r channel, assuming it's a greyscale detail texture - *8 is the detail map scaling, try other values here

Multiply the pixel shader result/ output with Detail. This might and will darken the result a little (because 0 <= Detail <= 1), so you could multiply Detail with 1.1 or add 0.1 to it.
© 2024 lite-C Forums