Hi and thanks in advance.
First shaders but I have a strange problem. this piece of code in the shader, on a W11 GeForce RTX 4060 Laptop GPU, latest driver 572.16.
The if in the code works fine discarding contributes over the plane but it adds a bad flickering (eve if th clip variable is false).
Othe nvidia cards and my amd is working properly.
How can I fix it?
Thanks.
#version 430 core
uniform bool clip;
uniform vec4 clipPlaneEq;
in vec4 point3d;
…
void main() {
…
if(clip)
{
if( dot(point3d, clipPlaneEq) > 0.0f)
{
FragColor = colorO;
discard;
}
}
…
}