]> git.tdb.fi Git - libs/gl.git/commit
Move lighting calculations to world space
authorMikko Rasa <tdb@tdb.fi>
Wed, 28 Apr 2021 21:18:54 +0000 (00:18 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 28 Apr 2021 21:59:33 +0000 (00:59 +0300)
commit82282de52e8e8f3bbafefaf92bf76f53f2c2495e
tree3643cc4e376882a2264acf2516648a43dc5bf9e2
parent7302c50728ea317bcabe2d243af6b9142aac4ccd
Move lighting calculations to world space

Eye space lighting was a holdover from legacy OpenGL.  TBN space lighting
was similarly a kludge from old dot3 bump mapping.  Using world space
makes everything a lot simpler and allows some additional optimizations.
15 files changed:
builtin_data/_occluder.glsl
builtin_data/_sky_backdrop.glsl
shaderlib/common.glsl
shaderlib/cooktorrance.glsl
shaderlib/msp_interface.glsl
shaderlib/phong.glsl
shaderlib/shadow.glsl
source/effects/environmentmap.cpp
source/effects/environmentmap.h
source/effects/shadowmap.cpp
source/effects/shadowmap.h
source/materials/lighting.cpp
source/render/renderer.cpp
source/render/renderer.h
source/render/scene.cpp