How can I use a bump map in a visual shader?

  • Figured I should add it here in case someone really needing it comes across this topic, there are examples of sobel on shadertoy.com, this one here specifically for generating normalmaps from bump. But it would take active porting effort on users part to get it to work in godot.

    If someone happens to create or port such a shader, consider also sharing it on godotshaders.com

bump map as in black and white bump map or bump map as in you really mean a normal map?

classic greyscale bump map

Yeah, that's what I was afraid of, this is going to be much more complicated than using a simple pre-computed normalmap.

Here's a GLSL example:
https://dev.to/ndesmic/webgl-engine-from-scratch-14-bump-maps-and-simple-animation-3fef

But if you're asking here then you probably aren't experienced enough to go porting glsl into visual shader graph(though it is one of the best ways to learn).

Unless of course you already know how to implement a sobel filter/operator, in which case converting bump/height map to a normal map will be easy!

I was hoping that I'm just stupid/blind and that there is an easy way. Nvm I guess.
I will just create a pre computed normal map then. But thanks for your help!

    7892 I will just create a pre computed normal map then.

    Yeah, that's probably the best way to go unless you are dealing with procedural generation and need the bump pattern/mapping to be randomly oriented. Normal map leaves less to be computed and as such should also be less compute/performance demanding.

    Figured I should add it here in case someone really needing it comes across this topic, there are examples of sobel on shadertoy.com, this one here specifically for generating normalmaps from bump. But it would take active porting effort on users part to get it to work in godot.

    If someone happens to create or port such a shader, consider also sharing it on godotshaders.com