Is there a way to find out during each shadow caster pass for a Lit material the light type (e.g directional/point) and light position being used in the case of point light? Is it set in a shader variable somewhere?
Graphics/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.hlsl at master · Unity-Technologies/Graphics (github.com)
Maybe this is what you are looking for.
That partially helps. I think what I am looking for is the name of this constant buffer that gets set for each shadow pass render dispatch so I can access it in the shader along with where its enum is defined. In this RenderDoc example, this is a point light that is going through each of its 6 faces. I can tell its the light as the posiiton is stored in cb1_v3.
I just want to be able to access this light info in my hlsl shader.
Ok the above buffer is actually ShaderVariablesGlobal and I’m using if (UNITY_MATRIX_I_P._44 == 1.0) to identify a light as directional, which is a bit loose and ghetto but gets me over the line.
You seem to have found the solution to your problem but did you use the #pragma enable_d3d11_debug_symbols ? that would allow renderdoc to show you the shader code and the name of constant buffers