0031275: Visualization, TKOpenGl - handle normal-map texture with Path-Tracing IR-2020-01-24 master
authoriko <iko@opencascade.com>
Tue, 21 Jan 2020 13:01:03 +0000 (16:01 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 24 Jan 2020 13:35:41 +0000 (16:35 +0300)
commit786077023239ed807d12180613e223f95a545b70
treef2071a303a7c29e33c5f3c44842478c9778b6064
parent6216ed573eba2e021c05ae79b13de3404ae2633d
0031275: Visualization, TKOpenGl - handle normal-map texture with Path-Tracing

Base normal map support has been implemented in path tracing (just geometry normal replacement).
Smooth normal adaptation has been implemeneted in order to avoid black areas artefacts during path tracing.
Tangent normal space calcuation has been moved to separate unified function.
Tangent space orthogonalization algorithm has been changed in order to handle all orientations and combinations of UV coordinates.
14 files changed:
src/Graphic3d/Graphic3d_RenderingParams.hxx
src/OpenGl/OpenGl_ShaderManager.cxx
src/OpenGl/OpenGl_View.hxx
src/OpenGl/OpenGl_View_Raytrace.cxx
src/Shaders/FILES
src/Shaders/PathtraceBase.fs
src/Shaders/PointLightAttenuation.glsl
src/Shaders/RaytraceBase.fs
src/Shaders/Shaders_PathtraceBase_fs.pxx
src/Shaders/Shaders_RaytraceBase_fs.pxx
src/Shaders/Shaders_TangentSpaceNormal_glsl.pxx [new file with mode: 0644]
src/Shaders/TangentSpaceNormal.glsl [new file with mode: 0644]
src/ViewerTest/ViewerTest_ViewerCommands.cxx
tests/v3d/raytrace/normal_map [new file with mode: 0644]