Merge pull request #106 from wacossusca34/circle-fix-undefined-fragcolor

Prevent `fragment` from being potentially undefined (Fixes #105)
This commit is contained in:
Levi Webb
2019-03-12 11:34:33 -07:00
committed by GitHub

View File

@@ -32,9 +32,6 @@ out vec4 fragment;
/* This shader is based on radial.glsl, refer to it for more commentary */
float apply_smooth(float theta) {
fragment = vec4(0, 0, 0, 0);
float idx = theta + ROTATE;
float dir = mod(abs(idx), TWOPI);
if (dir > PI)
@@ -53,6 +50,7 @@ float apply_smooth(float theta) {
}
void main() {
fragment = vec4(0, 0, 0, 0);
float
dx = gl_FragCoord.x - (screen.x / 2),
dy = gl_FragCoord.y - (screen.y / 2);