diff --git a/files/shaders/objects_fragment.glsl b/files/shaders/objects_fragment.glsl index 31e929a90b..bc6d03639a 100644 --- a/files/shaders/objects_fragment.glsl +++ b/files/shaders/objects_fragment.glsl @@ -90,7 +90,7 @@ void main() vec3 cameraPos = (gl_ModelViewMatrixInverse * vec4(0,0,0,1)).xyz; vec3 objectPos = (gl_ModelViewMatrixInverse * vec4(passViewPos, 1)).xyz; vec3 eyeDir = normalize(cameraPos - objectPos); - vec2 offset = getParallaxOffset(eyeDir, tbnTranspose, normalTex.a, (passTangent.w > 0) ? -1.f : 1.f); + vec2 offset = getParallaxOffset(eyeDir, tbnTranspose, normalTex.a, (passTangent.w > 0.0) ? -1.f : 1.f); adjustedDiffuseUV += offset; // only offset diffuse for now, other textures are more likely to be using a completely different UV set // TODO: check not working as the same UV buffer is being bound to different targets @@ -171,7 +171,7 @@ void main() #if @specularMap vec4 specTex = texture2D(specularMap, specularMapUV); - float shininess = specTex.a * 255; + float shininess = specTex.a * 255.0; vec3 matSpec = specTex.xyz; #else float shininess = gl_FrontMaterial.shininess; diff --git a/files/shaders/terrain_fragment.glsl b/files/shaders/terrain_fragment.glsl index b1917d33bb..5050616810 100644 --- a/files/shaders/terrain_fragment.glsl +++ b/files/shaders/terrain_fragment.glsl @@ -82,7 +82,7 @@ void main() #endif #if @specularMap - float shininess = 128; // TODO: make configurable + float shininess = 128.0; // TODO: make configurable vec3 matSpec = vec3(diffuseTex.a, diffuseTex.a, diffuseTex.a); #else float shininess = gl_FrontMaterial.shininess;