self.render_mode = material.render_mode
self.technique = material.technique
self.shader = material.shader
+ self.receive_shadows = material.receive_shadows
+ self.cast_shadows = (material.shadow_method!='NONE')
if self.render_mode=='EXTERNAL' and not self.technique:
raise Exception("Invalid configuration on material {}: No technique for external rendering".format(self.name))
self.name = "material_atlas_"+os.path.splitext(self.shader)[0]
else:
self.name = "material_atlas"
+ self.receive_shadows = materials[0].receive_shadows
+ self.cast_shadows = (materials[0].shadow_method!='NONE')
self.materials = materials
self.material_names = [m.name for m in self.materials]
for m in self.materials:
raise Exception("Conflicting render modes in MaterialAtlas constructor")
if self.render_mode=='CUSTOM' and m.shader!=self.shader:
raise Exception("Conflicting shaders in MaterialAtlas constructor")
+ if m.receive_shadows!=self.receive_shadows or m.shadow_method!=materials[0].shadow_method:
+ raise Exception("Conflicting shadow settings in MaterialAtlas constructor")
count = len(self.materials)
size = 1