|
@@ -74,11 +74,7 @@ class Material {
|
|
#if debug
|
|
#if debug
|
|
if( Type.getClass(m) != Type.getClass(this) ) throw this + " is missing clone()";
|
|
if( Type.getClass(m) != Type.getClass(this) ) throw this + " is missing clone()";
|
|
#end
|
|
#end
|
|
- var p = passes;
|
|
|
|
- while( p != null ) {
|
|
|
|
- m.addPass(p.clone());
|
|
|
|
- p = p.nextPass;
|
|
|
|
- }
|
|
|
|
|
|
+ // DO NOT clone passes (it's up to the superclass to recreate the shaders)
|
|
m.castShadows = castShadows;
|
|
m.castShadows = castShadows;
|
|
m.receiveShadows = receiveShadows;
|
|
m.receiveShadows = receiveShadows;
|
|
return m;
|
|
return m;
|