This commit is contained in:
turanszkij
2016-05-14 19:26:43 +02:00
parent b1b02fc8a1
commit 4abfb902b9
+2 -2
View File
@@ -7,8 +7,8 @@ float4 main(VertexToPixelPostProcess PSIn) : SV_TARGET
float4 hdr = xTexture.Load(uint3(PSIn.pos.xy,0));
float average_luminance = xMaskTex.Load(uint3(0,0,0)).r;
if (PSIn.pos.x < 100 && PSIn.pos.y < 100)
return float4(average_luminance.xxx,1);
//if (PSIn.pos.x < 100 && PSIn.pos.y < 100)
// return float4(average_luminance.xxx,1);
float luminance = dot(hdr.rgb, float3(0.2126, 0.7152, 0.0722));
luminance = (luminance * (1 + luminance)) / (1 + luminance); // Reinhard