Skip to content

Commit

Permalink
fixed editor grid
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed Oct 28, 2024
1 parent a6e9037 commit ecddff7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion editor/resources/shaders/grid.shader
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@

void main()
{
float t = -nearPoint.y / max(farPoint.y - nearPoint.y, 0.000001);
float denominator = farPoint.y - nearPoint.y;
float t = denominator != 0.0 ? -nearPoint.y / denominator : 0.0;

vec3 fragPos3D = nearPoint + t * (farPoint - nearPoint);

Expand Down

0 comments on commit ecddff7

Please sign in to comment.