vec4 col = vec4(color.rgb * gl_Color.rgb, 1.0);
+#ifdef ENABLE_TONE_MAPPING
+ col = applyToneMapping(col);
+#endif
+
#if MATERIAL_TYPE == TILE_MATERIAL_LIQUID_TRANSPARENT
float alpha = gl_Color.a;
if (fogDistance != 0.0) {
col = vec4(col.rgb, base.a);
#endif
-#ifdef ENABLE_TONE_MAPPING
- gl_FragColor = applyToneMapping(col);
-#else
gl_FragColor = col;
-#endif
}
vec4 col = vec4(color.rgb * gl_Color.rgb, 1.0);
+#ifdef ENABLE_TONE_MAPPING
+ col = applyToneMapping(col);
+#endif
+
#if MATERIAL_TYPE == TILE_MATERIAL_LIQUID_TRANSPARENT || MATERIAL_TYPE == TILE_MATERIAL_LIQUID_OPAQUE
float alpha = gl_Color.a;
if (fogDistance != 0.0) {
col = vec4(col.rgb, base.a);
#endif
-#ifdef ENABLE_TONE_MAPPING
- gl_FragColor = applyToneMapping(col);
-#else
gl_FragColor = col;
-#endif
}