fixed z fighting for GUI elements

This commit is contained in:
devZoGok
2024-05-17 17:22:48 +03:00
parent f4191ccd86
commit 3b3e4c0109
6 changed files with 36 additions and 29 deletions
+1 -1
View File
@@ -12,6 +12,6 @@ void main(){
float x, y;
x = (aVert.x + pos.x - screen.x * .5) / (screen.x * .5);
y = (screen.y * .5 - (aVert.y + pos.y)) / (screen.y * .5);
gl_Position = vec4(x, y, pos.z + aVert.z, 1);
gl_Position = vec4(x, y, -(pos.z + aVert.z), 1);
texCoords = aTexCoords;
}