Skip to content

Commit 1a595c2

Browse files
authored
Prevent fragment from being potentially undefined leading to driver-specific noise
This fixes noise in the center of the circle shader, where `d >= -(float(C_LINE) / 2.0F)` is false
1 parent c9dac68 commit 1a595c2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

shaders/circle/1.frag

+1-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ out vec4 fragment;
3232
/* This shader is based on radial.glsl, refer to it for more commentary */
3333

3434
float apply_smooth(float theta) {
35-
36-
fragment = vec4(0, 0, 0, 0);
37-
3835
float idx = theta + ROTATE;
3936
float dir = mod(abs(idx), TWOPI);
4037
if (dir > PI)
@@ -53,6 +50,7 @@ float apply_smooth(float theta) {
5350
}
5451

5552
void main() {
53+
fragment = vec4(0, 0, 0, 0);
5654
float
5755
dx = gl_FragCoord.x - (screen.x / 2),
5856
dy = gl_FragCoord.y - (screen.y / 2);

0 commit comments

Comments
 (0)