Add ClusterShadingStage
commit3018b697866ab029329b9dc7ec43d2f593999997
authorCarsten Neumann <carsten_neumann@gmx.net>
Thu, 6 Jul 2017 17:16:19 +0000 (6 12:16 -0500)
committerCarsten Neumann <carsten_neumann@gmx.net>
Thu, 6 Jul 2017 17:16:19 +0000 (6 12:16 -0500)
tree489cd40e812b00dfe896dac2d1a75adbf268b74b
parent6441a0f84d105df5bab7dac4b326055e02254180
Add ClusterShadingStage

Patch by Johannes Brunen.

It is based on:

Ola Olsson et.al
http://www.cse.chalmers.se/~uffe/clustered_shading_preprint.pdf
High Performance Graphics (2012), pp. 1–10
C. Dachsbacher, J. Munkberg, and J. Pantaleoni (Editors)

This invention describes the clustering the view frustum and population of these clusters by lights contributing to the shading of the cluster's fragments. Light lists are generated for each cluster and evaluated in the fragment shader.

Additionally I have used the SIGGRAPH 2015 course "Real-Time Many-Light Management and Shadows with Clustered Shading"
https://newq.net/publications/more/s2015-many-lights-course
34 files changed:
Examples/Advanced/CMakeLists.fromosg.txt
Examples/Advanced/CMakeLists.standalone.txt
Examples/Advanced/multirangelightclustershading.cpp [new file with mode: 0644]
Examples/Advanced/multirangelightclustershadingstage.cpp [new file with mode: 0644]
Source/Base/Base/OSGMatrixUtility.cpp
Source/Base/Base/OSGMatrixUtility.h
Source/Base/Base/OSGSimpleCurve.cpp [new file with mode: 0644]
Source/Base/Base/OSGSimpleCurve.h [new file with mode: 0644]
Source/Base/Base/OSGSimpleCurve.inl [copied from Source/Contrib/ComputeBase/Base/OSGAlgorithmComputeElementFields.h with 53% similarity]
Source/Contrib/ComputeBase/Base/OSGAlgorithmComputeElement.fcd
Source/Contrib/ComputeBase/Base/OSGAlgorithmComputeElementBase.cpp
Source/Contrib/ComputeBase/Base/OSGAlgorithmComputeElementFields.h
Source/Contrib/Techniques/CMakeLists.Lib.OSGContribTechniques.txt [new file with mode: 0644]
Source/Contrib/Techniques/CMakeLists.txt [new file with mode: 0644]
Source/Contrib/Techniques/OSGClusterShadingStage.cpp [new file with mode: 0644]
Source/Contrib/Techniques/OSGClusterShadingStage.fcd [new file with mode: 0644]
Source/Contrib/Techniques/OSGClusterShadingStage.h [new file with mode: 0644]
Source/Contrib/Techniques/OSGClusterShadingStage.inl [copied from Source/Contrib/ComputeBase/Base/OSGAlgorithmComputeElementFields.h with 51% similarity]
Source/Contrib/Techniques/OSGClusterShadingStageBase.cpp [new file with mode: 0644]
Source/Contrib/Techniques/OSGClusterShadingStageBase.h [new file with mode: 0644]
Source/Contrib/Techniques/OSGClusterShadingStageBase.inl [new file with mode: 0644]
Source/Contrib/Techniques/OSGClusterShadingStageData.cpp [copied from Source/Contrib/ComputeBase/Base/OSGAlgorithmComputeElementFields.h with 58% similarity]
Source/Contrib/Techniques/OSGClusterShadingStageData.fcd [new file with mode: 0644]
Source/Contrib/Techniques/OSGClusterShadingStageData.h [new file with mode: 0644]
Source/Contrib/Techniques/OSGClusterShadingStageData.inl [copied from Source/Contrib/ComputeBase/Base/OSGAlgorithmComputeElementFields.h with 58% similarity]
Source/Contrib/Techniques/OSGClusterShadingStageDataBase.cpp [new file with mode: 0644]
Source/Contrib/Techniques/OSGClusterShadingStageDataBase.h [new file with mode: 0644]
Source/Contrib/Techniques/OSGClusterShadingStageDataBase.inl [new file with mode: 0644]
Source/Contrib/Techniques/OSGClusterShadingStageDataFields.h [copied from Source/Contrib/ComputeBase/Base/OSGAlgorithmComputeElementFields.h with 87% similarity]
Source/Contrib/Techniques/OSGClusterShadingStageFields.h [copied from Source/Contrib/ComputeBase/Base/OSGAlgorithmComputeElementFields.h with 87% similarity]
Source/Contrib/Techniques/OSGContribTechniquesDef.cpp [copied from Source/Contrib/ComputeBase/Base/OSGAlgorithmComputeElementFields.h with 58% similarity]
Source/Contrib/Techniques/OSGContribTechniquesDef.h [copied from Source/Contrib/ComputeBase/Base/OSGAlgorithmComputeElementFields.h with 58% similarity]
Source/System/NodeCores/Drawables/Geometry/Util/OSGSimpleLightGeometry.cpp [new file with mode: 0644]
Source/System/NodeCores/Drawables/Geometry/Util/OSGSimpleLightGeometry.h [new file with mode: 0644]