From eb84bb298d2b95aec7b2ae12cbf25ac64f25379a Mon Sep 17 00:00:00 2001 From: tylermurphy534 Date: Sun, 6 Nov 2022 15:12:42 -0500 Subject: move to self host --- .../Shaders/Includes/CGI_PoiDebug.cginc | 102 +++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDebug.cginc (limited to 'VRCSDK3AvatarsLegacy/Assets/_PoiyomiShaders/Shaders/Includes/CGI_PoiDebug.cginc') 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 -- cgit v1.2.3-freya