[{"data":1,"prerenderedAt":726},["ShallowReactive",2],{"navigation":3,"\u002Fapi\u002Fwebgpu\u002Fdepth-of-field":213,"\u002Fapi\u002Fwebgpu\u002Fdepth-of-field-surround":721},[4,14,203],{"title":5,"path":6,"stem":7,"children":8},"Introduction","\u002Fgetting-started","1.getting-started\u002F1.index",[9,10],{"title":5,"path":6,"stem":7},{"title":11,"path":12,"stem":13},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":15,"path":16,"stem":17,"children":18},"Api","\u002Fapi","2.api",[19,22,148,178],{"title":20,"path":16,"stem":21},"API Reference","2.api\u002Findex",{"title":23,"path":24,"stem":25,"children":26},"Pmndrs Effects","\u002Fapi\u002Fpmndrs","2.api\u002F1.pmndrs\u002Findex",[27,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144],{"title":23,"path":24,"stem":25},{"title":29,"path":30,"stem":31},"ASCII","\u002Fapi\u002Fpmndrs\u002Fascii","2.api\u002F1.pmndrs\u002Fascii",{"title":33,"path":34,"stem":35},"Barrel Blur","\u002Fapi\u002Fpmndrs\u002Fbarrel-blur","2.api\u002F1.pmndrs\u002Fbarrel-blur",{"title":37,"path":38,"stem":39},"Bloom","\u002Fapi\u002Fpmndrs\u002Fbloom","2.api\u002F1.pmndrs\u002Fbloom",{"title":41,"path":42,"stem":43},"Brightness & Contrast","\u002Fapi\u002Fpmndrs\u002Fbrightness-contrast","2.api\u002F1.pmndrs\u002Fbrightness-contrast",{"title":45,"path":46,"stem":47},"Chromatic Aberration","\u002Fapi\u002Fpmndrs\u002Fchromatic-aberration","2.api\u002F1.pmndrs\u002Fchromatic-aberration",{"title":49,"path":50,"stem":51},"Color Average","\u002Fapi\u002Fpmndrs\u002Fcolor-average","2.api\u002F1.pmndrs\u002Fcolor-average",{"title":53,"path":54,"stem":55},"Color Depth","\u002Fapi\u002Fpmndrs\u002Fcolor-depth","2.api\u002F1.pmndrs\u002Fcolor-depth",{"title":57,"path":58,"stem":59},"Depth of Field","\u002Fapi\u002Fpmndrs\u002Fdepth-of-field","2.api\u002F1.pmndrs\u002Fdepth-of-field",{"title":61,"path":62,"stem":63},"Dot Screen","\u002Fapi\u002Fpmndrs\u002Fdot-screen","2.api\u002F1.pmndrs\u002Fdot-screen",{"title":65,"path":66,"stem":67},"Fish Eye","\u002Fapi\u002Fpmndrs\u002Ffish-eye","2.api\u002F1.pmndrs\u002Ffish-eye",{"title":69,"path":70,"stem":71},"FXAA","\u002Fapi\u002Fpmndrs\u002Ffxaa","2.api\u002F1.pmndrs\u002Ffxaa",{"title":73,"path":74,"stem":75},"Glitch","\u002Fapi\u002Fpmndrs\u002Fglitch","2.api\u002F1.pmndrs\u002Fglitch",{"title":77,"path":78,"stem":79},"God Rays","\u002Fapi\u002Fpmndrs\u002Fgod-rays","2.api\u002F1.pmndrs\u002Fgod-rays",{"title":81,"path":82,"stem":83},"Grid","\u002Fapi\u002Fpmndrs\u002Fgrid","2.api\u002F1.pmndrs\u002Fgrid",{"title":85,"path":86,"stem":87},"Hue & Saturation","\u002Fapi\u002Fpmndrs\u002Fhue-saturation","2.api\u002F1.pmndrs\u002Fhue-saturation",{"title":89,"path":90,"stem":91},"Kuwahara","\u002Fapi\u002Fpmndrs\u002Fkuwahara","2.api\u002F1.pmndrs\u002Fkuwahara",{"title":93,"path":94,"stem":95},"Lens Distortion","\u002Fapi\u002Fpmndrs\u002Flens-distortion","2.api\u002F1.pmndrs\u002Flens-distortion",{"title":97,"path":98,"stem":99},"Linocut","\u002Fapi\u002Fpmndrs\u002Flinocut","2.api\u002F1.pmndrs\u002Flinocut",{"title":101,"path":102,"stem":103},"N8AO","\u002Fapi\u002Fpmndrs\u002Fn8ao","2.api\u002F1.pmndrs\u002Fn8ao",{"title":105,"path":106,"stem":107},"Noise","\u002Fapi\u002Fpmndrs\u002Fnoise","2.api\u002F1.pmndrs\u002Fnoise",{"title":109,"path":110,"stem":111},"Outline","\u002Fapi\u002Fpmndrs\u002Foutline","2.api\u002F1.pmndrs\u002Foutline",{"title":113,"path":114,"stem":115},"Pixelation","\u002Fapi\u002Fpmndrs\u002Fpixelation","2.api\u002F1.pmndrs\u002Fpixelation",{"title":117,"path":118,"stem":119},"Scanline","\u002Fapi\u002Fpmndrs\u002Fscanline","2.api\u002F1.pmndrs\u002Fscanline",{"title":121,"path":122,"stem":123},"Sepia","\u002Fapi\u002Fpmndrs\u002Fsepia","2.api\u002F1.pmndrs\u002Fsepia",{"title":125,"path":126,"stem":127},"Shock Wave","\u002Fapi\u002Fpmndrs\u002Fshock-wave","2.api\u002F1.pmndrs\u002Fshock-wave",{"title":129,"path":130,"stem":131},"SMAA","\u002Fapi\u002Fpmndrs\u002Fsmaa","2.api\u002F1.pmndrs\u002Fsmaa",{"title":133,"path":134,"stem":135},"Texture","\u002Fapi\u002Fpmndrs\u002Ftexture","2.api\u002F1.pmndrs\u002Ftexture",{"title":137,"path":138,"stem":139},"Tilt Shift","\u002Fapi\u002Fpmndrs\u002Ftilt-shift","2.api\u002F1.pmndrs\u002Ftilt-shift",{"title":141,"path":142,"stem":143},"ToneMapping","\u002Fapi\u002Fpmndrs\u002Ftone-mapping","2.api\u002F1.pmndrs\u002Ftone-mapping",{"title":145,"path":146,"stem":147},"Vignette","\u002Fapi\u002Fpmndrs\u002Fvignette","2.api\u002F1.pmndrs\u002Fvignette",{"title":149,"path":150,"stem":151,"children":152},"Three Native Effects","\u002Fapi\u002Fthree","2.api\u002F2.three\u002Findex",[153,154,157,161,164,168,171,174],{"title":149,"path":150,"stem":151},{"title":73,"path":155,"stem":156},"\u002Fapi\u002Fthree\u002Fglitch","2.api\u002F2.three\u002Fglitch",{"title":158,"path":159,"stem":160},"Halftone","\u002Fapi\u002Fthree\u002Fhalftone","2.api\u002F2.three\u002Fhalftone",{"title":101,"path":162,"stem":163},"\u002Fapi\u002Fthree\u002Fn8ao","2.api\u002F2.three\u002Fn8ao",{"title":165,"path":166,"stem":167},"Output","\u002Fapi\u002Fthree\u002Foutput","2.api\u002F2.three\u002Foutput",{"title":113,"path":169,"stem":170},"\u002Fapi\u002Fthree\u002Fpixelation","2.api\u002F2.three\u002Fpixelation",{"title":129,"path":172,"stem":173},"\u002Fapi\u002Fthree\u002Fsmaa","2.api\u002F2.three\u002Fsmaa",{"title":175,"path":176,"stem":177},"Unreal Bloom","\u002Fapi\u002Fthree\u002Funreal-bloom","2.api\u002F2.three\u002Funreal-bloom",{"title":179,"path":180,"stem":181,"children":182},"WebGPU","\u002Fapi\u002Fwebgpu","2.api\u002F3.webgpu\u002Findex",[183,184,187,190,193,197,200],{"title":179,"path":180,"stem":181},{"title":37,"path":185,"stem":186},"\u002Fapi\u002Fwebgpu\u002Fbloom","2.api\u002F3.webgpu\u002Fbloom",{"title":45,"path":188,"stem":189},"\u002Fapi\u002Fwebgpu\u002Fchromatic-aberration","2.api\u002F3.webgpu\u002Fchromatic-aberration",{"title":57,"path":191,"stem":192},"\u002Fapi\u002Fwebgpu\u002Fdepth-of-field","2.api\u002F3.webgpu\u002Fdepth-of-field",{"title":194,"path":195,"stem":196},"Film","\u002Fapi\u002Fwebgpu\u002Ffilm","2.api\u002F3.webgpu\u002Ffilm",{"title":69,"path":198,"stem":199},"\u002Fapi\u002Fwebgpu\u002Ffxaa","2.api\u002F3.webgpu\u002Ffxaa",{"title":129,"path":201,"stem":202},"\u002Fapi\u002Fwebgpu\u002Fsmaa","2.api\u002F3.webgpu\u002Fsmaa",{"title":204,"path":205,"stem":206,"children":207},"Advanced","\u002Fadvanced","3.advanced\u002Findex",[208,209],{"title":204,"path":205,"stem":206},{"title":210,"path":211,"stem":212},"You might not need post-processing","\u002Fadvanced\u002Fyou-might-not-need-post-processing","3.advanced\u002Fyou-might-not-need-post-processing",{"id":214,"title":57,"body":215,"description":715,"extension":716,"links":717,"meta":718,"navigation":364,"path":191,"seo":719,"stem":192,"__hash__":720},"docs\u002F2.api\u002F3.webgpu\u002Fdepth-of-field.md",{"type":216,"value":217,"toc":709},"minimark",[218,224,236,244,249,494,498,512,575,579,593,692,696,705],[219,220,221],"docs-demo",{},[222,223],"webgpu-depth-of-field",{},[225,226,227,231,232,235],"p",{},[228,229,230],"code",{},"DepthOfField"," blurs the parts of the scene that are far from the focal plane, like a camera lens. It wraps three's ",[228,233,234],{},"DepthOfFieldNode",".",[225,237,238,239,243],{},"It reads the depth of the scene pass, so it needs no extra setup. It is an ",[240,241,242],"strong",{},"HDR"," effect, so bright areas make bright bokeh.",[245,246,248],"h2",{"id":247},"usage","Usage",[250,251,256],"pre",{"className":252,"code":253,"language":254,"meta":255,"style":255},"language-vue shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003Cscript setup lang=\"ts\">\nimport { TresCanvas } from '@tresjs\u002Fcore\u002Fwebgpu'\nimport { DepthOfField, EffectComposer } from '@tresjs\u002Fpost-processing\u002Fwebgpu'\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CTresCanvas>\n    \u003C!-- Your scene -->\n\n    \u003CEffectComposer>\n      \u003CDepthOfField :focus-distance=\"6.5\" :focal-length=\"3\" :bokeh-scale=\"4\" \u002F>\n    \u003C\u002FEffectComposer>\n  \u003C\u002FTresCanvas>\n\u003C\u002Ftemplate>\n","vue","",[228,257,258,293,322,349,359,366,376,387,394,399,410,465,475,485],{"__ignoreMap":255},[259,260,263,267,271,275,278,281,284,288,290],"span",{"class":261,"line":262},"line",1,[259,264,266],{"class":265},"sMK4o","\u003C",[259,268,270],{"class":269},"swJcz","script",[259,272,274],{"class":273},"spNyl"," setup",[259,276,277],{"class":273}," lang",[259,279,280],{"class":265},"=",[259,282,283],{"class":265},"\"",[259,285,287],{"class":286},"sfazB","ts",[259,289,283],{"class":265},[259,291,292],{"class":265},">\n",[259,294,296,300,303,307,310,313,316,319],{"class":261,"line":295},2,[259,297,299],{"class":298},"s7zQu","import",[259,301,302],{"class":265}," {",[259,304,306],{"class":305},"sTEyZ"," TresCanvas",[259,308,309],{"class":265}," }",[259,311,312],{"class":298}," from",[259,314,315],{"class":265}," '",[259,317,318],{"class":286},"@tresjs\u002Fcore\u002Fwebgpu",[259,320,321],{"class":265},"'\n",[259,323,325,327,329,332,335,338,340,342,344,347],{"class":261,"line":324},3,[259,326,299],{"class":298},[259,328,302],{"class":265},[259,330,331],{"class":305}," DepthOfField",[259,333,334],{"class":265},",",[259,336,337],{"class":305}," EffectComposer",[259,339,309],{"class":265},[259,341,312],{"class":298},[259,343,315],{"class":265},[259,345,346],{"class":286},"@tresjs\u002Fpost-processing\u002Fwebgpu",[259,348,321],{"class":265},[259,350,352,355,357],{"class":261,"line":351},4,[259,353,354],{"class":265},"\u003C\u002F",[259,356,270],{"class":269},[259,358,292],{"class":265},[259,360,362],{"class":261,"line":361},5,[259,363,365],{"emptyLinePlaceholder":364},true,"\n",[259,367,369,371,374],{"class":261,"line":368},6,[259,370,266],{"class":265},[259,372,373],{"class":269},"template",[259,375,292],{"class":265},[259,377,379,382,385],{"class":261,"line":378},7,[259,380,381],{"class":265},"  \u003C",[259,383,384],{"class":269},"TresCanvas",[259,386,292],{"class":265},[259,388,390],{"class":261,"line":389},8,[259,391,393],{"class":392},"sHwdD","    \u003C!-- Your scene -->\n",[259,395,397],{"class":261,"line":396},9,[259,398,365],{"emptyLinePlaceholder":364},[259,400,402,405,408],{"class":261,"line":401},10,[259,403,404],{"class":265},"    \u003C",[259,406,407],{"class":269},"EffectComposer",[259,409,292],{"class":265},[259,411,413,416,418,421,424,426,428,432,434,436,439,441,443,446,448,450,453,455,457,460,462],{"class":261,"line":412},11,[259,414,415],{"class":265},"      \u003C",[259,417,230],{"class":269},[259,419,420],{"class":265}," :",[259,422,423],{"class":273},"focus-distance",[259,425,280],{"class":265},[259,427,283],{"class":265},[259,429,431],{"class":430},"sbssI","6.5",[259,433,283],{"class":265},[259,435,420],{"class":265},[259,437,438],{"class":273},"focal-length",[259,440,280],{"class":265},[259,442,283],{"class":265},[259,444,445],{"class":430},"3",[259,447,283],{"class":265},[259,449,420],{"class":265},[259,451,452],{"class":273},"bokeh-scale",[259,454,280],{"class":265},[259,456,283],{"class":265},[259,458,459],{"class":430},"4",[259,461,283],{"class":265},[259,463,464],{"class":265}," \u002F>\n",[259,466,468,471,473],{"class":261,"line":467},12,[259,469,470],{"class":265},"    \u003C\u002F",[259,472,407],{"class":269},[259,474,292],{"class":265},[259,476,478,481,483],{"class":261,"line":477},13,[259,479,480],{"class":265},"  \u003C\u002F",[259,482,384],{"class":269},[259,484,292],{"class":265},[259,486,488,490,492],{"class":261,"line":487},14,[259,489,354],{"class":265},[259,491,373],{"class":269},[259,493,292],{"class":265},[245,495,497],{"id":496},"props","Props",[225,499,500,503,504,507,508,511],{},[228,501,502],{},"focusDistance"," and ",[228,505,506],{},"focalLength"," are in world units. ",[228,509,510],{},"bokehScale"," has no unit.",[513,514,515,531],"table",{},[516,517,518],"thead",{},[519,520,521,525,528],"tr",{},[522,523,524],"th",{},"Prop",[522,526,527],{},"Description",[522,529,530],{},"Default",[532,533,534,549,562],"tbody",{},[519,535,536,541,544],{},[537,538,539],"td",{},[228,540,502],{},[537,542,543],{},"The distance from the camera to the focal plane.",[537,545,546],{},[228,547,548],{},"1",[519,550,551,555,558],{},[537,552,553],{},[228,554,506],{},[537,556,557],{},"How far an object can be from the focal plane before it is fully out of focus.",[537,559,560],{},[228,561,548],{},[519,563,564,568,571],{},[537,565,566],{},[228,567,510],{},[537,569,570],{},"The size of the bokeh.",[537,572,573],{},[228,574,548],{},[245,576,578],{"id":577},"differences-from-depthoffieldpmndrs","Differences from DepthOfFieldPmndrs",[225,580,581,583,584,587,588,503,590,592],{},[228,582,230],{}," exposes the parameters of three's ",[228,585,586],{},"dof()"," function. ",[228,589,502],{},[228,591,506],{}," are in world units.",[513,594,595,608],{},[516,596,597],{},[519,598,599,604],{},[522,600,601],{},[228,602,603],{},"DepthOfFieldPmndrs",[522,605,606],{},[228,607,230],{},[532,609,610,621,632,642,658,677],{},[519,611,612,617],{},[537,613,614],{},[228,615,616],{},"worldFocusDistance",[537,618,619],{},[228,620,502],{},[519,622,623,628],{},[537,624,625],{},[228,626,627],{},"worldFocusRange",[537,629,630],{},[228,631,506],{},[519,633,634,638],{},[537,635,636],{},[228,637,510],{},[537,639,640],{},[228,641,510],{},[519,643,644,652],{},[537,645,646,648,649],{},[228,647,502],{},", ",[228,650,651],{},"focusRange",[537,653,654,655,657],{},"Not available. They are in normalized depth, from 0 to 1. ",[228,656,234],{}," only takes world units.",[519,659,660,671],{},[537,661,662,648,665,648,668],{},[228,663,664],{},"resolutionScale",[228,666,667],{},"resolutionX",[228,669,670],{},"resolutionY",[537,672,673,674,676],{},"Not available. ",[228,675,234],{}," always blurs at half resolution.",[519,678,679,684],{},[537,680,681],{},[228,682,683],{},"blendFunction",[537,685,686,687,235],{},"Not available. The WebGPU family has no blend functions. See ",[688,689,691],"a",{"href":690},"\u002Fapi\u002Fwebgpu#blending","Blending",[245,693,695],{"id":694},"further-reading","Further Reading",[225,697,698,699,235],{},"See the ",[688,700,704],{"href":701,"rel":702},"https:\u002F\u002Fthreejs.org\u002Fexamples\u002F?q=dof#webgpu_postprocessing_dof",[703],"nofollow","three.js example",[706,707,708],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":255,"searchDepth":262,"depth":295,"links":710},[711,712,713,714],{"id":247,"depth":295,"text":248},{"id":496,"depth":295,"text":497},{"id":577,"depth":295,"text":578},{"id":694,"depth":295,"text":695},"Blur the scene in front of and behind the focus distance.","md",null,{},{"title":57,"description":715},"BVdWu6YGadPrBgTgI4uZ0wQvopkKp61UxAPeF_fRT2I",[722,724],{"title":45,"path":188,"stem":189,"description":723,"children":-1},"Split the color channels towards the edges of the screen.",{"title":194,"path":195,"stem":196,"description":725,"children":-1},"Add animated film grain.",1795084225314]