Quantcast
Channel: Babylon.js
Viewing all articles
Browse latest Browse all 388

Bump maps

$
0
0

Well, I'm managed to generate textures and meshes using procedural techniques.  Now I'm working on bump maps.  For my first attempt, my assumption was the bitmap contained the actual normals, no worky.  I guess this means the values in the bitmap are actually offsets from the interpolated normal in the vertex shader?  What does the math look like?  Is it this?

 

normalize(vertex_shader_normal + bump_map_normal)

 

I'm pretty sure I understand the encoding of the bitmap (ie -1.0 to 1.0 -> 0 to 255) for (xyz -> rgb)

 

 


Viewing all articles
Browse latest Browse all 388

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>