Albedo,
Normals,
Metallness,
Smoothness
Smoothness,
Occlusion
};
public class LightweightPipelineAsset : RenderPipelineAsset
case DebugViewMode.Smoothness:
LightweightShaderUtils.SetDebugMode(cmd, DebugViewKeyword.SMOOTHNESS);
break;
case DebugViewMode.Occlusion:
LightweightShaderUtils.SetDebugMode(cmd, DebugViewKeyword.OCCLUSION);
}
context.ExecuteCommandBuffer(cmd);
CommandBufferPool.Release(cmd);
METALNESS,
NORMALS,
SMOOTHNESS,
OCCLUSION,
NUM_VIEWS
"_DEBUG_ALBEDO",
"_DEBUG_METALNESS",
"_DEBUG_NORMALS",
"_DEBUG_SMOOTHNESS"
"_DEBUG_SMOOTHNESS",
"_DEBUG_OCCLUSION"
public static string GetShaderPath(ShaderPathID id)
debug = sqrt(inputData.normalWS);
#elif defined(_DEBUG_SMOOTHNESS)
debug = surfaceData.smoothness;
#elif defined(_DEBUG_OCCLUSION)
ApplySSAO(surfaceData.occlusion, IN.shadowCoord);
debug = surfaceData.occlusion;
#endif
return half4(debug, 1);
// GPU Instancing
#pragma multi_compile_instancing
#pragma multi_compile _ _DEBUG_ALBEDO _DEBUG_METALNESS _DEBUG_NORMALS _DEBUG_SMOOTHNESS
#pragma multi_compile _ _DEBUG_ALBEDO _DEBUG_METALNESS _DEBUG_NORMALS _DEBUG_SMOOTHNESS _DEBUG_OCCLUSION
//#include "LWRP/ShaderLibrary/LightweightPassDebug.hlsl"
#include "LWRP/ShaderLibrary/LightweightPassLit.hlsl"
ENDHLSL
#pragma vertex LitPassVertex
#pragma fragment DebugPassFragment