Skip to content
Snippets Groups Projects
Commit 4961a087 authored by Alexander Rose's avatar Alexander Rose
Browse files

fix fog, uncommented shader macro

parent 814d432f
No related branches found
No related tags found
No related merge requests found
// #ifdef dUseFog
#ifdef dUseFog
float depth = length(vViewPosition);
// float depth = gl_FragCoord.z / gl_FragCoord.w;
float fogFactor = smoothstep(uFogNear, uFogFar, depth);
gl_FragColor.rgb = mix(gl_FragColor.rgb, uFogColor, fogFactor);
// #endif
\ No newline at end of file
#endif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment