Skip to content

Commit 31b4ae0

Browse files
committed
workaround alpha blending for blender 4.2
1 parent 661ede7 commit 31b4ae0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

io_ogre/ogre/material.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def generate_pass( self, mat, pass_name="" ):
194194
if mat.blend_method == "CLIP":
195195
alpha = mat_wrapper.alpha
196196
self.w.iword('alpha_rejection greater_equal').round(255*mat.alpha_threshold).nl()
197-
elif mat.blend_method != "OPAQUE":
197+
elif mat.blend_method == "BLEND":
198198
alpha = mat_wrapper.alpha
199199
self.w.iword('scene_blend alpha_blend').nl()
200200
if mat.show_transparent_back:

io_ogre/ogre/materialv2json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def generate_pbs_datablock(self, material):
212212
pass
213213
elif material.blend_method == "CLIP": # CLIP enables alpha_test (alpha rejection)
214214
datablock["alpha_test"] = ["greater_equal", material.alpha_threshold, False]
215-
elif material.blend_method in ["HASHED", "BLEND"]:
215+
elif material.blend_method == "BLEND":
216216
datablock["transparency"] = {
217217
"mode": "Transparent",
218218
"use_alpha_from_textures": tex_filename != None, # DEFAULT

0 commit comments

Comments
 (0)