|
|
|
|
|
|
RWTexture2D<float3> diffuseLightingUAV; |
|
|
|
RWTexture2D<float4> specularLightingUAV; |
|
|
|
|
|
|
|
CBUFFER_START(UnityShadeOpaque) |
|
|
|
CBUFFER_START(UnityDeferredCompute) |
|
|
|
StructuredBuffer<uint> g_TileList; |
|
|
|
|
|
|
|
StructuredBuffer<uint> g_TileList; |
|
|
|
// Indirect |
|
|
|
[numthreads(16, 16, 1)] |
|
|
|
void SHADE_OPAQUE_ENTRY(uint2 groupThreadId : SV_GroupThreadID, uint groupId : SV_GroupID) |
|
|
|
|
|
|
uint2 pixelCoord = tileCoord * GetTileSize() + groupThreadId; |
|
|
|
|
|
|
|
PositionInputs posInput = GetPositionInput(pixelCoord.xy, _ScreenSize.zw, tileCoord); |
|
|
|
|
|
|
|
uint2 tileCoord = groupId; |
|
|
|
PositionInputs posInput = GetPositionInput(pixelCoord.xy, _ScreenSize.zw, groupId); |
|
|
|
|
|
|
|
|
|
|
|
// This need to stay in sync with deferred.shader |
|
|
|
|
|
|
|
PositionInputs posInput = GetPositionInput(pixelCoord.xy, _ScreenSize.zw, tileCoord); |
|
|
|
|
|
|
|
float depth = LOAD_TEXTURE2D(_MainDepthTexture, posInput.unPositionSS).x; |
|
|
|
|
|
|
|