From dda07f97fd5625948876bbdd67e936076cf7a481 Mon Sep 17 00:00:00 2001 From: aniisaaden Date: Wed, 15 Jul 2020 14:14:28 +0200 Subject: [PATCH] Readability changes --- modules/softwareintegration/shaders/point_fs.glsl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/softwareintegration/shaders/point_fs.glsl b/modules/softwareintegration/shaders/point_fs.glsl index 3ba74d89e9..3dc4029f75 100644 --- a/modules/softwareintegration/shaders/point_fs.glsl +++ b/modules/softwareintegration/shaders/point_fs.glsl @@ -37,9 +37,9 @@ Fragment getFragment() { frag.depth = vs_depthClipSpace; frag.gPosition = vs_positionViewSpace; - vec2 temp = gl_PointCoord - vec2(0.5); - float f = dot(temp, temp); - if (f>0.25) discard; + float radius = 0.5; + float distance = length(gl_PointCoord - vec2(radius)); + if (distance > pow(radius, 2)) discard; // There is no normal here frag.gNormal = vec4(0.0, 0.0, -1.0, 1.0);