@@ -1658,35 +1658,33 @@ function WebGLRenderer( parameters ) {
1658
1658
1659
1659
if ( materialProperties . program === undefined ) {
1660
1660
1661
- material . needsUpdate = true ;
1661
+ initMaterial ( material , scene , object ) ;
1662
1662
1663
1663
} else if ( material . fog && materialProperties . fog !== fog ) {
1664
1664
1665
- material . needsUpdate = true ;
1665
+ initMaterial ( material , scene , object ) ;
1666
1666
1667
1667
} else if ( materialProperties . environment !== environment ) {
1668
1668
1669
- material . needsUpdate = true ;
1669
+ initMaterial ( material , scene , object ) ;
1670
1670
1671
1671
} else if ( materialProperties . needsLights && ( materialProperties . lightsStateVersion !== lights . state . version ) ) {
1672
1672
1673
- material . needsUpdate = true ;
1673
+ initMaterial ( material , scene , object ) ;
1674
1674
1675
1675
} else if ( materialProperties . numClippingPlanes !== undefined &&
1676
1676
( materialProperties . numClippingPlanes !== _clipping . numPlanes ||
1677
1677
materialProperties . numIntersection !== _clipping . numIntersection ) ) {
1678
1678
1679
- material . needsUpdate = true ;
1679
+ initMaterial ( material , scene , object ) ;
1680
1680
1681
1681
} else if ( materialProperties . outputEncoding !== _this . outputEncoding ) {
1682
1682
1683
- material . needsUpdate = true ;
1683
+ initMaterial ( material , scene , object ) ;
1684
1684
1685
1685
}
1686
1686
1687
- }
1688
-
1689
- if ( material . version !== materialProperties . __version ) {
1687
+ } else {
1690
1688
1691
1689
initMaterial ( material , scene , object ) ;
1692
1690
materialProperties . __version = material . version ;
0 commit comments