File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545 x : 0 ,
4646 y : 0 ,
4747 z : 0
48- }
48+ } ,
49+ dimensions : threadDim
4950 } ;
5051
5152 for ( ctx . thread . z = 0 ; ctx . thread . z < threadDim [ 2 ] ; ctx . thread . z ++ ) {
Original file line number Diff line number Diff line change 107107 funcStr = funcStr . replace ( new RegExp ( 'this.thread.x' , 'g' ) , 'gpu_threadX' ) ;
108108 funcStr = funcStr . replace ( new RegExp ( 'this.thread.y' , 'g' ) , 'gpu_threadY' ) ;
109109 funcStr = funcStr . replace ( new RegExp ( 'this.thread.z' , 'g' ) , 'gpu_threadZ' ) ;
110+ funcStr = funcStr . replace ( new RegExp ( 'this.dimensions.x' , 'g' ) , 'gpu_dimensionsX' ) ;
111+ funcStr = funcStr . replace ( new RegExp ( 'this.dimensions.y' , 'g' ) , 'gpu_dimensionsY' ) ;
112+ funcStr = funcStr . replace ( new RegExp ( 'this.dimensions.z' , 'g' ) , 'gpu_dimensionsZ' ) ;
110113 funcStr = funcStr . replace ( new RegExp ( 'Math.' , 'g' ) , 'gpu_math_' ) ;
111114
112115 var vertShaderSrc = [
623626 retArr . push ( 'threadId.y' ) ;
624627 } else if ( idtNode . name == "gpu_threadZ" ) {
625628 retArr . push ( 'threadId.z' ) ;
629+ } else if ( idtNode . name == "gpu_dimensionsX" ) {
630+ retArr . push ( 'uOutputDim.x' ) ;
631+ } else if ( idtNode . name == "gpu_dimensionsY" ) {
632+ retArr . push ( 'uOutputDim.y' ) ;
633+ } else if ( idtNode . name == "gpu_dimensionsZ" ) {
634+ retArr . push ( 'uOutputDim.z' ) ;
626635 } else {
627636 retArr . push ( 'user_' + idtNode . name ) ;
628637 }
You can’t perform that action at this time.
0 commit comments