Skip to content

Commit

Permalink
viv transmission
Browse files Browse the repository at this point in the history
  • Loading branch information
e-rk committed Feb 10, 2024
1 parent 0458a53 commit a242fa2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions speedtools/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ class Polygon(BasePolygon):
material: int
backface_culling: bool
is_lane: bool = False
transmissive: bool = False


@dataclass(frozen=True)
Expand Down
4 changes: 3 additions & 1 deletion speedtools/viv_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ def from_file(cls, path: Path) -> VivData:
def _make_polygon(cls, polygon: FceParser.Polygon) -> Polygon:
face = tuple(vertex for vertex in polygon.face)
uv = tuple(UV(u, 1 - v) for u, v in zip(polygon.u, polygon.v))
return Polygon(face=face, uv=uv, material=polygon.texture, backface_culling=True)
transmissive = (polygon.smoothing & 0x3c0) != 0
return Polygon(face=face, uv=uv, material=polygon.texture, backface_culling=True,
transmissive=transmissive)

@classmethod
def _match_attributes(cls, attribute: PartAttributes) -> bool:
Expand Down

0 comments on commit a242fa2

Please sign in to comment.