提交 1736aa73 编写于 作者: D dubejf

Fix parallaxmap shader crash

Fixes #5813.
上级 c4349d43
......@@ -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.
先完成此消息的编辑!
想要评论请 注册