Skip to content

Commit

Permalink
Update converter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilaa3 committed Oct 16, 2024
1 parent faab64f commit 86b75f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fast64_internal/f3d/bsdf_converter/converter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import copy
import math
import typing
import dataclasses
import numpy as np
Expand Down Expand Up @@ -619,8 +620,8 @@ def material_to_f3d(
t: TextureFieldProperty = f3d_tex.T
s.low = abstracted_tex.offset[0]
t.low = abstracted_tex.offset[1]
s.shift = int(abstracted_tex.scale[0] // 2) # TODO
t.shift = int(abstracted_tex.scale[1] // 2)
s.shift = int(-math.log2(abstracted_tex.scale[0]))
t.shift = int(-math.log2(abstracted_tex.scale[1]))

with bpy.context.temp_override(material=new_material):
update_all_node_values(new_material, bpy.context) # Reload everything
Expand Down

0 comments on commit 86b75f3

Please sign in to comment.