提交 0b9af5ee 编写于 作者: M Mr.doob

ShaderLib: Replaced res code as per @tschw suggestion in #7153.

上级 96035ecc
......@@ -1087,7 +1087,7 @@ THREE.ShaderLib = {
" depth /= 1000.0;",
" const vec4 bitSh = vec4( 256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0 );",
" const vec4 bitMsk = vec4( 0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0 );",
" vec4 res = fract( depth * bitSh );",
" vec4 res = mod( depth * bitSh * vec4( 255 ), vec4( 256 ) ) / vec4( 255 );",
" res -= res.xxyz * bitMsk;",
" return res; ",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册