Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions fast64_internal/f3d/f3d_gbi.py
Original file line number Diff line number Diff line change
Expand Up @@ -3804,6 +3804,10 @@ def to_binary(self, f3d, segments):
+ gsMoveWd(f3d.G_MW_CLIP, f3d.G_MWO_CLIP_RPY, shortRatioPos, f3d)
)

def to_c(self, static=True):
header = "gsSPClipRatio(" if static else "gSPClipRatio(glistp++, "
return f"{header}FRUSTRATIO_{self.ratio})"

def size(self, f3d):
return GFX_SIZE * 4

Expand Down
2 changes: 1 addition & 1 deletion fast64_internal/f3d/f3d_material.py
Original file line number Diff line number Diff line change
Expand Up @@ -3656,7 +3656,7 @@ class RDPSettings(PropertyGroup):
clip_ratio: bpy.props.IntProperty(
default=1,
min=1,
max=2**15 - 1,
max=6,
update=update_node_values_with_preset,
)

Expand Down
2 changes: 1 addition & 1 deletion fast64_internal/f3d/f3d_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,7 @@ def processCommands(self, dlData: str, dlName: str, dlCommands: "list[ParsedMacr
rdp_settings: "RDPSettings" = mat.rdp_settings

if command.name == "gsSPClipRatio":
rdp_settings.clip_ratio = math_eval(command.params[0], self.f3d)
rdp_settings.clip_ratio = int(command.params[0].removeprefix("FRUSTRATIO_"))
elif command.name == "gsSPNumLights":
self.numLights = self.getLightCount(command.params[0])
elif command.name == "gsSPLight":
Expand Down
Loading