diff --git a/src/easymesh/shinydebugUV.lolfx b/src/easymesh/shinydebugUV.lolfx index 5c70c78a..841b53e4 100644 --- a/src/easymesh/shinydebugUV.lolfx +++ b/src/easymesh/shinydebugUV.lolfx @@ -53,14 +53,14 @@ void main(void) float mode = 0.0; if (mode == 0.0) { - gl_FragColor = vec4(mod(pass_TexCoord.x, 1.0f), + gl_FragColor = vec4(mod(pass_TexCoord.x, 1.0), 0.1, mod(pass_TexCoord.y, 1.0), 1.0); } else { - float col = ((mod(mode, 2.0) == 1)?(mod(pass_TexCoord.x, 1.0)):(mod(pass_TexCoord.y, 1.0))); - if (mode == 1 || mode == 2) + float col = ((mod(mode, 2.0) == 1.0)?(mod(pass_TexCoord.x, 1.0)):(mod(pass_TexCoord.y, 1.0))); + if (mode == 1.0 || mode == 2.0) { if (col > 1.0/3.0) gl_FragColor.r = 0.0; else gl_FragColor.r = min(col, 1.0/3.0); @@ -68,14 +68,14 @@ void main(void) else gl_FragColor.g = min(max(col, 1.0/3.0) - 1.0/3.0, 1.0/3.0); gl_FragColor.b = min(max(col, 2.0/3.0) - 2.0/3.0, 1.0/3.0); } - else if (mode == 3 || mode == 4) + else if (mode == 3.0 || mode == 4.0) { if (col > 0.5) gl_FragColor.r = 0.0; else gl_FragColor.r = min(col, 0.5); gl_FragColor.g = min(max(col, 0.5) - 0.5, 0.5); gl_FragColor.b = 0.1; } - else if (mode == 5 || mode == 6) + else if (mode == 5.0 || mode == 6.0) { gl_FragColor.r = col; gl_FragColor.g = 0.1; diff --git a/src/easymesh/shinydebugnormal.lolfx b/src/easymesh/shinydebugnormal.lolfx index 4619fd22..fb87d478 100644 --- a/src/easymesh/shinydebugnormal.lolfx +++ b/src/easymesh/shinydebugnormal.lolfx @@ -47,9 +47,9 @@ varying vec4 pass_Color; void main(void) { vec3 real_color = vec3(0.0, 0.0, 0.0); - real_color += abs(pass_TNormal.x) * ((pass_TNormal.x < .0f)?(vec3(0.0, 1.0, 1.0)):(vec3(1.0, 0.0, 0.0))); - real_color += abs(pass_TNormal.y) * ((pass_TNormal.y < .0f)?(vec3(1.0, 0.0, 1.0)):(vec3(0.0, 1.0, 0.0))); - real_color += abs(pass_TNormal.z) * ((pass_TNormal.z < .0f)?(vec3(1.0, 1.0, 0.0)):(vec3(0.0, 0.0, 1.0))); + real_color += abs(pass_TNormal.x) * ((pass_TNormal.x < 0.0)?(vec3(0.0, 1.0, 1.0)):(vec3(1.0, 0.0, 0.0))); + real_color += abs(pass_TNormal.y) * ((pass_TNormal.y < 0.0)?(vec3(1.0, 0.0, 1.0)):(vec3(0.0, 1.0, 0.0))); + real_color += abs(pass_TNormal.z) * ((pass_TNormal.z < 0.0)?(vec3(1.0, 1.0, 0.0)):(vec3(0.0, 0.0, 1.0))); gl_FragColor = vec4(real_color, pass_Color.w); }