diff options
Diffstat (limited to 'client/shaders/plants_shader')
-rw-r--r-- | client/shaders/plants_shader/opengl_fragment.glsl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/client/shaders/plants_shader/opengl_fragment.glsl b/client/shaders/plants_shader/opengl_fragment.glsl index de6ad4c05..abbcada88 100644 --- a/client/shaders/plants_shader/opengl_fragment.glsl +++ b/client/shaders/plants_shader/opengl_fragment.glsl @@ -17,11 +17,12 @@ const float e = 2.718281828459; void main (void)
{
- float use_normalmap = texture2D(useNormalmap,vec2(1.0,1.0)).r;
- float enable_bumpmapping = enableBumpmapping;
-
vec3 color;
vec2 uv = gl_TexCoord[0].st;
+
+#ifdef NORMALS
+ float use_normalmap = texture2D(useNormalmap,vec2(1.0,1.0)).r;
+ float enable_bumpmapping = enableBumpmapping;
if ((enable_bumpmapping == 1.0) && (use_normalmap > 0.0)) {
vec3 base = texture2D(baseTexture, uv).rgb;
@@ -35,6 +36,9 @@ void main (void) } else {
color = texture2D(baseTexture, uv).rgb;
}
+#else
+ color = texture2D(baseTexture, uv).rgb;
+#endif
float alpha = texture2D(baseTexture, uv).a;
vec4 col = vec4(color.r, color.g, color.b, alpha);
|