File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 456456 var textureCount = 0 ;
457457 for ( textureCount = 0 ; textureCount < paramNames . length ; textureCount ++ ) {
458458 var paramDim , paramSize , texture ;
459- if ( Array . isArray ( arguments [ textureCount ] ) ) {
459+ var argType = getArgumentType ( arguments [ textureCount ] ) ;
460+ if ( argType == "Array" ) {
460461 paramDim = getDimensions ( arguments [ textureCount ] , true ) ;
461462 paramSize = dimToTexSize ( gpu , paramDim ) ;
462463
496497 gl . uniform2fv ( paramSizeLoc , paramSize ) ;
497498 }
498499 gl . uniform1i ( paramLoc , textureCount ) ;
499- } else if ( typeof arguments [ textureCount ] == "number " ) {
500+ } else if ( argType == "Number " ) {
500501 var argLoc = gl . getUniformLocation ( program , "user_" + paramNames [ textureCount ] ) ;
501502 gl . uniform1f ( argLoc , arguments [ textureCount ] ) ;
502- } else if ( arguments [ textureCount ] instanceof GPUTexture ) {
503- paramDim = getDimensions ( arguments [ textureCount ] ) ;
503+ } else if ( argType == "Texture" ) {
504+ paramDim = getDimensions ( arguments [ textureCount ] , true ) ;
504505 paramSize = arguments [ textureCount ] . size ;
505506 texture = arguments [ textureCount ] . texture ;
506507 textures [ textureCount ] = texture ;
You can’t perform that action at this time.
0 commit comments