Browse Source

USDZExporter: Added texture.rotation support. (#26013)

mrdoob 2 years ago
parent
commit
b0f51c3e40
1 changed files with 1 additions and 0 deletions
  1. 1 0
      examples/jsm/exporters/USDZExporter.js

+ 1 - 0
examples/jsm/exporters/USDZExporter.js

@@ -484,6 +484,7 @@ function buildMaterial( material, textures ) {
         {
             uniform token info:id = "UsdTransform2d"
             token inputs:in.connect = </Materials/Material_${ material.id }/PrimvarReader_${ mapType }.outputs:result>
+			float inputs:rotation = ${ texture.rotation * ( 180 / Math.PI ) }
 			float2 inputs:scale = ${ buildVector2( texture.repeat ) }
             float2 inputs:translation = ${ buildVector2( texture.offset ) }
             float2 outputs:result