mat_res = resources[material.name+".mat"]
+ blend_st = None
+ if material.blended:
+ blend_st = Statement("blend", Token("SRC_ALPHA"), Token("ONE_MINUS_SRC_ALPHA"))
+
if material.render_mode=='CUSTOM':
for m in material.render_methods:
st = Statement("method", m.tag)
if mat_res and m.use_material:
st.sub.append(tech_res.create_reference_statement("material", mat_res))
+ if m.tag=="blended" and blend_st:
+ st.sub.append(blend_st)
+
shader = m.shader
if shader.endswith(".glsl"):
shader += ".shader"
if mat_res:
st.sub.append(tech_res.create_embed_statement("material", mat_res))
- if material.blended:
- ss.sub.append(Statement("blend", Token("SRC_ALPHA"), Token("ONE_MINUS_SRC_ALPHA")))
+ if blend_st:
+ st.sub.append(blend_st)
if material.receive_shadows:
st.sub.append(Statement("receive_shadows", True))
if material.image_based_lighting: