|
@@ -10,17 +10,22 @@ shader Surface
|
|
|
{
|
|
{
|
|
|
void fsmain(
|
|
void fsmain(
|
|
|
in VStoFS input,
|
|
in VStoFS input,
|
|
|
- out float4 OutGBufferA : SV_Target0,
|
|
|
|
|
- out float4 OutGBufferB : SV_Target1,
|
|
|
|
|
- out float2 OutGBufferC : SV_Target2)
|
|
|
|
|
|
|
+ out float3 OutSceneColor : SV_Target0,
|
|
|
|
|
+ out float4 OutGBufferA : SV_Target1,
|
|
|
|
|
+ out float4 OutGBufferB : SV_Target2,
|
|
|
|
|
+ out float2 OutGBufferC : SV_Target3,
|
|
|
|
|
+ out float OutGBufferD : SV_Target4)
|
|
|
{
|
|
{
|
|
|
SurfaceData surfaceData;
|
|
SurfaceData surfaceData;
|
|
|
surfaceData.albedo = float4(0.05f, 0.05f, 0.05f, 1.0f);
|
|
surfaceData.albedo = float4(0.05f, 0.05f, 0.05f, 1.0f);
|
|
|
surfaceData.worldNormal.xyz = input.tangentToWorldZ;
|
|
surfaceData.worldNormal.xyz = input.tangentToWorldZ;
|
|
|
surfaceData.roughness = 1.0f;
|
|
surfaceData.roughness = 1.0f;
|
|
|
surfaceData.metalness = 0.0f;
|
|
surfaceData.metalness = 0.0f;
|
|
|
|
|
+ surfaceData.mask = gLayer;
|
|
|
|
|
|
|
|
- encodeGBuffer(surfaceData, OutGBufferA, OutGBufferB, OutGBufferC);
|
|
|
|
|
|
|
+ encodeGBuffer(surfaceData, OutGBufferA, OutGBufferB, OutGBufferC, OutGBufferD);
|
|
|
|
|
+
|
|
|
|
|
+ OutSceneColor = 0.0f;
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
};
|
|
};
|