File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -465,6 +465,12 @@ function buildMaterial( material, textures ) {
465465
466466 const uv = texture . channel > 0 ? 'st' + texture . channel : 'st' ;
467467
468+ const WRAPPINGS = {
469+ 1000 : 'repeat' , // RepeatWrapping
470+ 1001 : 'clamp' , // ClampToEdgeWrapping
471+ 1002 : 'repeat' // MirroredRepeatWrapping
472+ } ;
473+
468474 return `
469475 def Shader "PrimvarReader_${ mapType } "
470476 {
@@ -489,8 +495,8 @@ function buildMaterial( material, textures ) {
489495 asset inputs:file = @textures/Texture_${ id } .${ isRGBA ? 'png' : 'jpg' } @
490496 float2 inputs:st.connect = </Materials/Material_${ material . id } /Transform2d_${ mapType } .outputs:result>
491497 token inputs:sourceColorSpace = "${ texture . colorSpace === THREE . NoColorSpace ? 'raw' : 'sRGB' } "
492- token inputs:wrapS = "repeat "
493- token inputs:wrapT = "repeat "
498+ token inputs:wrapS = "${ WRAPPINGS [ texture . wrapS ] } "
499+ token inputs:wrapT = "${ WRAPPINGS [ texture . wrapT ] } "
494500 float outputs:r
495501 float outputs:g
496502 float outputs:b
You can’t perform that action at this time.
0 commit comments