未验证 提交 3ba7d2b7 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #14633 from greggman/distance-fog

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