Nabla
Nabla copied to clipboard
Make Bumpmapping Consistent with Displacement Mapping
Describe the bug
Right now per-pixel derivative tangent frame calculation is invariant to UV or position scaling.
Bump ~~scale~~ height should be given relative to modelspace coordinates, i.e. a height of 1.0 should be 1-unit of modelspace coordinates.
Steps to Reproduce
Use Tessellation Shader or Parallax Occlusion Mapping to Displace a surface, compute the normal from per-pixel derivatives of the world space positions.
Compare computed normal with derivative map normal as given by nbl_glsl_perturb functions.
Expected vs observed behavior
Displacement mapped normal should be consistent with derivative map.
P.S. Also implement Schussler et. al, no one likes black crap in their derivative maps.
Schussler postponed.