File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
src/renderers/webgl-fallback/nodes Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -524,14 +524,13 @@ ${ flowData.code }
524524 let snippet = null ;
525525 let group = false ;
526526
527- if ( uniform . type === 'texture' ) {
527+ if ( uniform . type === 'texture' || uniform . type === 'texture3D' ) {
528528
529529 const texture = uniform . node . value ;
530530
531531 let typePrefix = '' ;
532532
533- if ( texture . isDataTexture === true ) {
534-
533+ if ( texture . isDataTexture === true || texture . isData3DTexture === true ) {
535534
536535 if ( texture . type === UnsignedIntType ) {
537536
@@ -545,7 +544,11 @@ ${ flowData.code }
545544
546545 }
547546
548- if ( texture . compareFunction ) {
547+ if ( uniform . type === 'texture3D' ) {
548+
549+ snippet = `${ typePrefix } sampler3D ${ uniform . name } ;` ;
550+
551+ } else if ( texture . compareFunction ) {
549552
550553 snippet = `sampler2DShadow ${ uniform . name } ;` ;
551554
@@ -563,10 +566,6 @@ ${ flowData.code }
563566
564567 snippet = `samplerCube ${ uniform . name } ;` ;
565568
566- } else if ( uniform . type === 'texture3D' ) {
567-
568- snippet = `sampler3D ${ uniform . name } ;` ;
569-
570569 } else if ( uniform . type === 'buffer' ) {
571570
572571 const bufferNode = uniform . node ;
@@ -1115,7 +1114,7 @@ ${vars}
11151114
11161115${ this . getSignature ( ) }
11171116
1118- // extensions
1117+ // extensions
11191118${ shaderData . extensions }
11201119
11211120// precision
You can’t perform that action at this time.
0 commit comments