diff options
| author | tylermurphy534 <tylermurphy534@gmail.com> | 2022-11-06 15:12:42 -0500 |
|---|---|---|
| committer | tylermurphy534 <tylermurphy534@gmail.com> | 2022-11-06 15:12:42 -0500 |
| commit | eb84bb298d2b95aec7b2ae12cbf25ac64f25379a (patch) | |
| tree | efd616a157df06ab661c6d56651853431ac6b08b /VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDebug.cginc | |
| download | unityprojects-eb84bb298d2b95aec7b2ae12cbf25ac64f25379a.tar.gz unityprojects-eb84bb298d2b95aec7b2ae12cbf25ac64f25379a.tar.bz2 unityprojects-eb84bb298d2b95aec7b2ae12cbf25ac64f25379a.zip | |
move to self host
Diffstat (limited to 'VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDebug.cginc')
| -rw-r--r-- | VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDebug.cginc | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDebug.cginc b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDebug.cginc new file mode 100644 index 00000000..4792487c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDebug.cginc @@ -0,0 +1,102 @@ +#ifndef POI_DEBUG + #define POI_DEBUG + + float _DebugEnabled; + uint _DebugMeshData; + uint _DebugLightingData; + uint _DebugCameraData; + + void displayDebugInfo(inout float4 finalColor) + { + UNITY_BRANCH + if (_DebugEnabled != 0) + { + //Mesh Data + if (_DebugMeshData == 1) + { + finalColor.rgb = poiMesh.normals[0]; + return; + } + else if(_DebugMeshData == 2) + { + finalColor.rgb = poiMesh.normals[1]; + return; + } + else if(_DebugMeshData == 3) + { + finalColor.rgb = poiMesh.tangent; + return; + } + else if(_DebugMeshData == 4) + { + finalColor.rgb = poiMesh.binormal; + return; + } + + #ifdef POI_LIGHTING + if (_DebugLightingData == 1) + { + finalColor.rgb = poiLight.attenuation; + return; + } + else if(_DebugLightingData == 2) + { + finalColor.rgb = poiLight.directLighting; + return; + } + else if(_DebugLightingData == 3) + { + finalColor.rgb = poiLight.indirectLighting; + return; + } + else if(_DebugLightingData == 4) + { + finalColor.rgb = poiLight.lightMap; + return; + } + else if(_DebugLightingData == 5) + { + finalColor.rgb = poiLight.rampedLightMap; + return; + } + else if(_DebugLightingData == 6) + { + finalColor.rgb = poiLight.finalLighting; + return; + } + else if(_DebugLightingData == 7) + { + finalColor.rgb = poiLight.nDotL; + return; + } + #endif + + if(_DebugCameraData == 1) + { + finalColor.rgb = poiCam.viewDir; + return; + } + else if(_DebugCameraData == 2) + { + finalColor.rgb = poiCam.tangentViewDir; + return; + } + else if(_DebugCameraData == 3) + { + finalColor.rgb = poiCam.forwardDir; + return; + } + else if(_DebugCameraData == 4) + { + finalColor.rgb = poiCam.worldPos; + return; + } + else if(_DebugCameraData == 5) + { + finalColor.rgb = poiCam.viewDotNormal; + return; + } + } + } + +#endif
\ No newline at end of file |