diff --git a/assets/shaders/engine/circleProfilePicture.frag b/assets/shaders/engine/circleProfilePicture.frag index 6cf0b2ab..1a641250 100644 --- a/assets/shaders/engine/circleProfilePicture.frag +++ b/assets/shaders/engine/circleProfilePicture.frag @@ -6,6 +6,6 @@ void main() { float len = length(openfl_TextureCoordv - vec2(0.5, 0.5)); float r = 0.5 - (1.0 / openfl_TextureSize.x); vec4 c = flixel_texture2D(bitmap, openfl_TextureCoordv); - vec4 color = mix(vec4(0, 0, 0, 0.5), c, c.a); - gl_FragColor = color * clamp(1 - ((len - r) * openfl_TextureSize.x), 0, 1); + vec4 color = mix(vec4(0.0, 0.0, 0.0, 0.5), c, c.a); + gl_FragColor = color * clamp(1.0 - ((len - r) * openfl_TextureSize.x), 0.0, 1.0); } \ No newline at end of file diff --git a/assets/shaders/engine/editorBlur.frag b/assets/shaders/engine/editorBlur.frag index 66b3eafb..ffcbc755 100644 --- a/assets/shaders/engine/editorBlur.frag +++ b/assets/shaders/engine/editorBlur.frag @@ -7,9 +7,9 @@ int steps = 16; int stepsInside = 2; float strength = 0.0075; vec4 getColor(vec2 pos) { - if (pos.x < 0) pos.x = 0; + if (pos.x < 0.0) pos.x = 0.0; else if (pos.x > 1.0 - (1.0 / openfl_TextureSize.x)) pos.x = 1.0 - (1.0 / openfl_TextureSize.x); - if (pos.y < 0) pos.y = 0; + if (pos.y < 0.0) pos.y = 0.0; else if (pos.y > 1.0 - (1.0 / openfl_TextureSize.y)) pos.y = 1.0 - (1.0 / openfl_TextureSize.y); // return textureCam(bitmap, pos); return flixel_texture2D(bitmap, pos); @@ -17,15 +17,18 @@ vec4 getColor(vec2 pos) { void main() { // vec2 camPos = getCamPos(openfl_TextureCoordv); vec2 camPos = openfl_TextureCoordv; - if (camPos.x < 0 || camPos.x > 1 || camPos.y < 0 || camPos.y > 1) + if (camPos.x < 0.0 || camPos.x > 1.0 || camPos.y < 0.0 || camPos.y > 1.0) return; vec4 color = getColor(camPos); float fsteps = steps; - for(float inside = 1; inside < stepsInside+1; inside++) { + for(float inside = 1.0; inside < stepsInside+1.0; inside++) { for(int i = 0; i < steps; i++) { float fi = i; - color += getColor(camPos + vec2(strength * (inside / stepsInside) * cos(fi / fsteps * (PI * 2.0)), strength * (inside / stepsInside) * sin(fi / fsteps * (PI * 2.0)))); + color += getColor(camPos + vec2( + strength * (inside / stepsInside) * cos(fi / fsteps * (PI * 2.0)), + strength * (inside / stepsInside) * sin(fi / fsteps * (PI * 2.0)) + )); } } diff --git a/assets/shaders/engine/updaterShader.frag b/assets/shaders/engine/updaterShader.frag index f3a63166..ef6fec03 100644 --- a/assets/shaders/engine/updaterShader.frag +++ b/assets/shaders/engine/updaterShader.frag @@ -28,7 +28,7 @@ void main() { hsv.g = (1.0/3.0) * strength * coords.y; - hsv.r = mod(elapsed + coords.x + coords.y, 1); + hsv.r = mod(elapsed + coords.x + coords.y, 1.0); gl_FragColor = vec4(hsv2rgb(hsv), color.a); } \ No newline at end of file