1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0027337: [Regression vs. 6.9.1] Selection highlight is poor in ray traced mode with FSAA

For FSAA mode we now store the depth values from first sample in myRaytraceFBO1 and do not modify it while collecting the rest of samples.
When all samples are gathered we fetch color from myRaytraceFBO2 and depth from myRaytraceFBO1 and display it to the current FBO.

Test bugs vis bug27337 added.
This commit is contained in:
duv
2016-04-04 12:16:49 +03:00
committed by abv
parent 63fad07eb4
commit d9e72440ee
3 changed files with 78 additions and 51 deletions

View File

@@ -4,6 +4,9 @@ uniform sampler2D uInputTexture;
//! Ray tracing depth image.
uniform sampler2D uDepthTexture;
//! Gamma correction flag.
uniform int uApplyGamma;
//! Output pixel color.
out vec4 OutColor;
@@ -14,6 +17,13 @@ void main (void)
float aDepth = texelFetch (uDepthTexture, ivec2 (gl_FragCoord.xy), 0).r;
gl_FragDepth = aDepth;
// apply gamma correction (we use gamma = 2)
OutColor = vec4 (sqrt (aColor.rgb), aColor.a);
if (uApplyGamma == 1)
{
// apply gamma correction (we use gamma = 2)
OutColor = vec4 (sqrt (aColor.rgb), aColor.a);
}
else
{
OutColor = aColor;
}
}