OpenGL ES 3.0 specifies that "For fixed-point depth buffers, the final
fragment depth written by a fragment shader is first clamped to [0, 1]
and then converted to fixed-point as if it were a window z value (see
section 2.13.1). For floating-point depth buffers, conversion is not
performed but clamping is."
Change-Id: Ic7f22f7e47106aaa86c4916fbbbe23ad9c52e186
Reviewed-on: https://swiftshader-review.googlesource.com/15628
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
}
}
}
- }
- Bool PixelPipeline::alphaTest(Int cMask[4])
- {
current.x = Min(current.x, Short4(0x0FFF)); current.x = Max(current.x, Short4(0x0000));
current.y = Min(current.y, Short4(0x0FFF)); current.y = Max(current.y, Short4(0x0000));
current.z = Min(current.z, Short4(0x0FFF)); current.z = Max(current.z, Short4(0x0000));
current.w = Min(current.w, Short4(0x0FFF)); current.w = Max(current.w, Short4(0x0000));
+ }
+ Bool PixelPipeline::alphaTest(Int cMask[4])
+ {
if(!state.alphaTestActive())
{
return true;
c[i] = oC[i];
}
}
+
+ clampColor(c);
+
+ if(state.depthOverride)
+ {
+ oDepth = Min(Max(oDepth, Float4(0.0f)), Float4(1.0f));
+ }
}
Bool PixelProgram::alphaTest(Int cMask[4])
{
- clampColor(c);
-
if(!state.alphaTestActive())
{
return true;