提交 54bebd93 编写于 作者: G Gregg Tavares

distance fog

上级 141c3d2b
#ifdef USE_FOG #ifdef USE_FOG
float fogDepth = length(fogPosition);
#ifdef FOG_EXP2 #ifdef FOG_EXP2
float fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) ); float fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );
......
#ifdef USE_FOG #ifdef USE_FOG
uniform vec3 fogColor; uniform vec3 fogColor;
varying float fogDepth; varying vec3 fogPosition;
#ifdef FOG_EXP2 #ifdef FOG_EXP2
......
#ifdef USE_FOG #ifdef USE_FOG
varying float fogDepth; varying vec3 fogPosition;
#endif #endif
#ifdef USE_FOG #ifdef USE_FOG
fogDepth = -mvPosition.z; fogPosition = mvPosition.xyz;
#endif #endif
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册