diff --git a/Toolbox/Shader/Layout/Legacy/Bflyt.frag b/Toolbox/Shader/Layout/Legacy/Bflyt.frag index dee821e5..b8ceafcc 100644 --- a/Toolbox/Shader/Layout/Legacy/Bflyt.frag +++ b/Toolbox/Shader/Layout/Legacy/Bflyt.frag @@ -109,9 +109,9 @@ float AlphaCombiner(int type, vec4 j1, vec4 j2, vec4 j3) void main() { - vec4 textureMap0 = vec4(1); - vec4 textureMap1 = vec4(1); - vec4 textureMap2 = vec4(1); + vec4 textureMap0 = vec4(1.0); + vec4 textureMap1 = vec4(1.0); + vec4 textureMap2 = vec4(1.0); if (numTextureMaps > 0) { @@ -128,10 +128,10 @@ void main() vec3 whiteColorSRGB = pow(whiteColor.rgb, vec3(1.0 / gamma)); vec3 whiteInterpolation = whiteColorSRGB.rgb * textureMap0.rgb; - vec3 blackInterpolation = (vec3(1) - textureMap0.rgb) * blackColor.rgb; + vec3 blackInterpolation = (vec3(1.0) - textureMap0.rgb) * blackColor.rgb; //vec3 colorBlend = whiteInterpolation + blackInterpolation; - vec3 colorBlend = ColorCombiner(4, vec4(whiteColorSRGB.rgb, 1), blackColor, textureMap0); + vec3 colorBlend = ColorCombiner(4, vec4(whiteColorSRGB.rgb, 1.0), blackColor, textureMap0); float alpha = textureMap0.a * whiteColor.a; @@ -140,14 +140,14 @@ void main() vec4 j2; vec4 j3; vec4 fragOutput; - vec4 previousStage = vec4(1); + vec4 previousStage = vec4(1.0); if (numTextureMaps > 1 && numTevStages > 4) { for (int i = 0; i < numTevStages; i++) { j1 = textureMap0; j2 = textureMap1; - j3 = vec4(1); + j3 = vec4(1.0); if (numTextureMaps > 2) j3 = textureMap2; @@ -175,7 +175,7 @@ void main() gl_FragColor = fragOutput; } else if (debugShading == 5) - gl_FragColor = vec4(textureMap0.rgb, 1); + gl_FragColor = vec4(textureMap0.rgb, 1.0); else if (debugShading == 1) gl_FragColor = gl_Color; else if (debugShading == 2) diff --git a/Toolbox/Shader/Layout/Legacy/Bflyt.vert b/Toolbox/Shader/Layout/Legacy/Bflyt.vert index 88a2623f..7344e480 100644 --- a/Toolbox/Shader/Layout/Legacy/Bflyt.vert +++ b/Toolbox/Shader/Layout/Legacy/Bflyt.vert @@ -1,6 +1,4 @@ -#version 110 - -uniform int flipTexture; +uniform int flipTexture; uniform mat4 rotationMatrix; uniform int texCoords0GenType; uniform int texCoords0Source; @@ -20,24 +18,16 @@ vec2 SetFlip(vec2 tex) vec2 outTexCoord = tex; if (flipTexture == 1) //FlipH - return vec2(-1, 1) * tex + vec2(1, 0); + return vec2(-1.0, 1.0) * tex + vec2(1.0, 0.0); else if (flipTexture == 2) //FlipV - return vec2(1, -1) * tex + vec2(0, 1); + return vec2(1.0, -1.0) * tex + vec2(0.0, 1.0); else if (flipTexture == 3) //Rotate90 - { - float degreesR = 90.0; - return rotateUV(tex, radians(degreesR)); - } + return rotateUV(tex, radians(90.0)); else if (flipTexture == 4) //Rotate180 - { - float degreesR = 180.0; - return rotateUV(tex, radians(degreesR)); - } + return rotateUV(tex, radians(180.0)); else if (flipTexture == 5) //Rotate270 - { - float degreesR = 270.0; - return rotateUV(tex, radians(degreesR)); - } + return rotateUV(tex, radians(270.0)); + return outTexCoord; } @@ -46,7 +36,7 @@ vec2 SetTexCoordType(int type, vec2 tex) vec2 outTexCoord = tex; if (type == 0) return tex; //Tex0 if (type == 1) return tex; //Tex1 - if (type == 2) return tex; //Tex3 + if (type == 2) return tex; //Tex2 if (type == 3) return tex; //Ortho if (type == 4) return tex; //Pane based if (type == 5) return tex; //Proj