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

WebGLRenderer: Recompile program when fog changes. Fixes #9384.

上级 58778fdb
......@@ -1631,6 +1631,12 @@ function WebGLRenderer( parameters ) {
}
if ( material.fog ) {
materialProperties.fog = fog;
}
if ( material.lights ) {
// store the light setup it was created for
......@@ -1729,6 +1735,13 @@ function WebGLRenderer( parameters ) {
}
if ( materialProperties.fog !== undefined &&
materialProperties.fog !== fog ) {
material.needsUpdate = true;
}
if ( materialProperties.lightsHash !== undefined &&
materialProperties.lightsHash !== _lights.hash ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册