|
|
|
|
|
|
|
|
|
|
static LocalDataBRDF g_localParams; |
|
|
|
|
|
|
|
StandardData UnityStandardDataFromGbuffer(float4 gbuffer0, float4 gbuffer1, float4 gbuffer2, float4 gbuffer3) |
|
|
|
StandardData UnityStandardDataFromGbufferAux(float4 gbuffer0, float4 gbuffer1, float4 gbuffer2, float4 gbuffer3) |
|
|
|
{ |
|
|
|
StandardData data; |
|
|
|
|
|
|
|
|
|
|
float4 gbuffer2 = _CameraGBufferTexture2.Load( uint3(pixCoord.xy, 0) ); |
|
|
|
float4 gbuffer3 = _CameraGBufferTexture3.Load( uint3(pixCoord.xy, 0) ); |
|
|
|
|
|
|
|
StandardData data = UnityStandardDataFromGbuffer(gbuffer0, gbuffer1, gbuffer2, gbuffer3); |
|
|
|
StandardData data = UnityStandardDataFromGbufferAux(gbuffer0, gbuffer1, gbuffer2, gbuffer3); |
|
|
|
|
|
|
|
g_localParams.gbuf = data; |
|
|
|
g_localParams.oneMinusReflectivity = 1.0 - SpecularStrength(data.specularColor.rgb); |
|
|
|