mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-02-16 17:35:39 +00:00
adjust (hopefully correct) fog equation
This commit is contained in:
parent
bc08276d60
commit
62eafacfc3
|
@ -21,7 +21,7 @@ static const char *vertexShaderBasic =
|
|||
"fsViewVertex = vec3(gl_ModelViewMatrix * gl_Vertex);\n"
|
||||
"fsViewNormal = normalize(gl_NormalMatrix *gl_Normal);\n"
|
||||
"float z = length(fsViewVertex);\n"
|
||||
"fsFogFactor = clamp(fogIntensity*(fogStart + z * fogDensity), 0.0, 1.0);\n"
|
||||
"fsFogFactor = fogIntensity * clamp((z-fogStart) * fogDensity, 0.0, 1.0);\n"
|
||||
|
||||
"gl_FrontColor = gl_Color;\n"
|
||||
"gl_TexCoord[0] = gl_MultiTexCoord0;\n"
|
||||
|
|
Loading…
Reference in a new issue