@@ -19,7 +19,7 @@
float fogFactor = smoothstep( fogNear, fogFar, depth );
#endif
-
- outgoingLight = mix( outgoingLight, fogColor, fogFactor );
-#endif
+ gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
+
+#endif
@@ -27,8 +27,8 @@ void main() {
outgoingLight = diffuseColor.rgb; // simple shader
- #include <fog_fragment>
gl_FragColor = linearToOutputTexel( vec4( outgoingLight, diffuseColor.a ) );
+ #include <fog_fragment>
}
@@ -41,8 +41,9 @@ void main() {
vec3 outgoingLight = reflectedLight.indirectDiffuse;
#include <envmap_fragment>
@@ -68,8 +68,9 @@ void main() {
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveLight;
@@ -53,8 +53,8 @@ void main() {
@@ -64,8 +64,8 @@ void main() {
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;
@@ -20,8 +20,8 @@ void main() {
outgoingLight = diffuseColor.rgb;