Skip to content

Commit

Permalink
Updated function name for Dragorn
Browse files Browse the repository at this point in the history
  • Loading branch information
sauraen committed Feb 14, 2024
1 parent bb3a64f commit 6f69983
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fast64_internal/f3d/f3d_material.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def does_blender_use_mix(settings: "RDPSettings", mix: str, default_for_no_rende
return settings.blend_b1 == mix or (is_two_cycle and settings.blend_b2 == mix)


def is_blender_lerp(
def is_blender_equation_equal(
settings: "RDPSettings", cycle: int, p: str, a: str, m: str, b: str, default_for_no_rendermode: bool = False
) -> bool:
assert cycle in {1, 2, -1} # -1 = last cycle
Expand All @@ -272,7 +272,7 @@ def is_blender_lerp(


def is_blender_doing_fog(settings: "RDPSettings", default_for_no_rendermode: bool) -> bool:
return is_blender_lerp(
return is_blender_equation_equal(
settings,
# If 2 cycle, fog must be in first cycle.
1,
Expand All @@ -293,7 +293,9 @@ def get_blend_method(material: bpy.types.Material) -> str:
return drawLayerSM64Alpha[material.f3d_mat.draw_layer.sm64]
if settings.cvg_x_alpha:
return "CLIP"
if settings.force_bl and is_blender_lerp(settings, -1, "G_BL_CLR_IN", "G_BL_A_IN", "G_BL_CLR_MEM", "G_BL_1MA"):
if settings.force_bl and is_blender_equation_equal(
settings, -1, "G_BL_CLR_IN", "G_BL_A_IN", "G_BL_CLR_MEM", "G_BL_1MA"
):
return "BLEND"
return "OPAQUE"

Expand Down

0 comments on commit 6f69983

Please sign in to comment.