Today I found that RenderDoc 1.1 added HLSL level debugging: https://github.com/baldurk/renderdoc/releases/v1.1
So I gave it a try. However, when debugging the fragment shader, I noticed that the debugger gave very different result with or without "Fast Shader Build Hack". Actually with the hack, most lighting codes are skipped due to lightMask is mostly zero.
With the hack, worldMaterialIdx is defined as:
Code: Select all
uint4 worldMaterialIdx[2];
Code: Select all
@piece( DeclareObjLightMask )uint objLightMask = worldMaterialIdx[inPs.drawId].z;@end
Anyway, this is one more reason why Fast Shader Build Hack may be disabled