提交 aee03c4e 编写于 作者: R Ricardo Cabello

Merge pull request #6769 from dubejf/parallax

Fix parallaxmap shader crash
......@@ -82,7 +82,9 @@ THREE.ParallaxShader = {
"float heightFromTexture = texture2D( bumpMap, currentTextureCoords ).r;",
// while ( heightFromTexture > currentLayerHeight )
"for ( int i = 0; i == 0; i += 0 ) {",
// Infinite loops are not well supported. Do a "large" finite
// loop, but not too large, as it slows down some compilers.
"for ( int i = 0; i < 30; i += 1 ) {",
"if ( heightFromTexture <= currentLayerHeight ) {",
"break;",
"}",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册