@@ -715,6 +715,10 @@ var testBlueFill = definePlugin({
715715 type : "bool" ,
716716 default : false
717717 } ,
718+ fullTransparent : {
719+ type : "bool" ,
720+ default : false
721+ } ,
718722 padding : {
719723 type : "int" ,
720724 default : 0
@@ -769,6 +773,16 @@ var testBlueFill = definePlugin({
769773 height
770774 } ;
771775 }
776+ if ( params . fullTransparent ) {
777+ for ( let i = 0 ; i < len ; i += 4 ) {
778+ buffer [ i + 3 ] = 0 ;
779+ }
780+ return {
781+ data : buffer ,
782+ width,
783+ height
784+ } ;
785+ }
772786 if ( params . fillOtherChannels ) {
773787 for ( let i = 0 ; i < len ; i += 4 ) {
774788 buffer [ i ] = 0 ;
@@ -830,23 +844,32 @@ var testBlueFill = definePlugin({
830844 } ) ,
831845 ui . text ( { text : `Count: ${ params . count } ` } )
832846 ] ) ,
833- // ui.text({ text: "Use new buffer" }),
834- ui . checkbox ( {
835- label : "Use new buffer" ,
836- key : "useNewBuffer" ,
837- value : params . useNewBuffer
838- } ) ,
839- // ui.text({ text: "Fill other channels" }),
840- ui . checkbox ( {
841- key : "fillOtherChannels" ,
842- label : "Fill other channels" ,
843- value : params . fillOtherChannels
844- } ) ,
845- ui . checkbox ( {
846- key : "passThrough" ,
847- label : "Pass through" ,
848- value : params . passThrough
849- } ) ,
847+ ui . group ( { direction : "row" } , [
848+ // ui.text({ text: "Use new buffer" }),
849+ ui . checkbox ( {
850+ label : "Use new buffer" ,
851+ key : "useNewBuffer" ,
852+ value : params . useNewBuffer
853+ } ) ,
854+ // ui.text({ text: "Fill other channels" }),
855+ ui . checkbox ( {
856+ key : "fillOtherChannels" ,
857+ label : "Fill other channels" ,
858+ value : params . fillOtherChannels
859+ } )
860+ ] ) ,
861+ ui . group ( { direction : "row" } , [
862+ ui . checkbox ( {
863+ key : "passThrough" ,
864+ label : "Pass through" ,
865+ value : params . passThrough
866+ } ) ,
867+ ui . checkbox ( {
868+ key : "fullTransparent" ,
869+ label : "Full transparent" ,
870+ value : params . fullTransparent
871+ } )
872+ ] ) ,
850873 ui . text ( { text : "Color" } ) ,
851874 ui . colorInput ( {
852875 key : "color" ,
@@ -1178,6 +1201,7 @@ var directionalBlur = definePlugin({
11781201 const shader = device . createShaderModule ( {
11791202 code
11801203 } ) ;
1204+ console . log ( { shader } ) ;
11811205 const defs = makeShaderDataDefinitions2 ( code ) ;
11821206 const pipeline = device . createComputePipeline ( {
11831207 layout : "auto" ,
@@ -3333,7 +3357,8 @@ var t7 = createTranslator({
33333357 scale : "Scale" ,
33343358 turbulence : "Turbulence" ,
33353359 colorShift : "Color Shift" ,
3336- timeSeed : "Flow Seed"
3360+ timeSeed : "Flow Seed" ,
3361+ padding : "Padding"
33373362 } ,
33383363 ja : {
33393364 title : "\u30D5\u30EB\u30A4\u30C9 \u30C7\u30A3\u30B9\u30C8\u30FC\u30B7\u30E7\u30F3 V11" ,
@@ -3342,7 +3367,8 @@ var t7 = createTranslator({
33423367 scale : "\u30B9\u30B1\u30FC\u30EB" ,
33433368 turbulence : "\u4E71\u6D41" ,
33443369 colorShift : "\u8272\u30B7\u30D5\u30C8" ,
3345- timeSeed : "\u30D5\u30ED\u30FC\u30B7\u30FC\u30C9"
3370+ timeSeed : "\u30D5\u30ED\u30FC\u30B7\u30FC\u30C9" ,
3371+ padding : "\u30D1\u30C7\u30A3\u30F3\u30B0"
33463372 }
33473373} ) ;
33483374var fluidDistortion = definePlugin ( {
@@ -3375,6 +3401,10 @@ var fluidDistortion = definePlugin({
33753401 type : "real" ,
33763402 default : 0.1
33773403 } ,
3404+ padding : {
3405+ type : "int" ,
3406+ default : 0
3407+ } ,
33783408 timeSeed : {
33793409 type : "real" ,
33803410 default : 0
@@ -3515,6 +3545,23 @@ var fluidDistortion = definePlugin({
35153545 value : params . timeSeed
35163546 } )
35173547 ] )
3548+ ] ) ,
3549+ ui . group ( { direction : "col" } , [
3550+ ui . text ( { text : t7 ( "padding" ) } ) ,
3551+ ui . group ( { direction : "row" } , [
3552+ ui . slider ( {
3553+ key : "padding" ,
3554+ dataType : "int" ,
3555+ min : 0 ,
3556+ max : 600 ,
3557+ value : params . padding
3558+ } ) ,
3559+ ui . numberInput ( {
3560+ key : "padding" ,
3561+ dataType : "int" ,
3562+ value : params . padding
3563+ } )
3564+ ] )
35183565 ] )
35193566 ] ) ;
35203567 } ,
0 commit comments