You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From each `fxHooks`, you can receive [`updateFx`, `setParams`, `fxObject`] in array format. The `config` is an object, which varies for each Hook, containing details such as `size` and `dpr`.
14
+
From each `fxHooks`, you can receive [`updateFx`, `setParams`, `fxObject`] in array format. The `config` is an object, which varies for each Hook, containing details such as `size`,`dpr` and `samples`.
15
15
16
16
1.`updateFx` - A function to be invoked inside `useFrame`, returning a `THREE.Texture`.
17
17
2.`setParams` - A function to refresh the parameters, beneficial for performance tweaking, etc.
@@ -45,9 +45,8 @@ import { useFluid } from "@hmng8/use-shader-fx";
You can control the `dpr` using the `PerformanceMonitor` from [drei](https://github.com/pmndrs/drei). For more details, please refer to the [scaling-performance](https://docs.pmnd.rs/react-three-fiber/advanced/scaling-performance) of r3f.
@@ -146,8 +274,14 @@ type UseFboProps = {
146
274
size:Size;
147
275
/** If dpr is set, dpr will be multiplied, default:false */
148
276
dpr?:number|false;
149
-
/** Whether to resize on resizes. If isDpr is true, set FBO to setSize even if dpr is changed, default:false */
277
+
/** Whether to resize when resizing occurs. If isDpr is true, set FBO to setSize even if dpr is changed, default:false */
150
278
isSizeUpdate?:boolean;
279
+
/** Defines the count of MSAA samples. Can only be used with WebGL 2. Default is 0. */
280
+
samples?:number;
281
+
/** Renders to the depth buffer. Unlike the three.js, Default is false. */
282
+
depthBuffer?:boolean;
283
+
/** If set, the scene depth will be rendered to this texture. Default is false. */
0 commit comments