Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions docs/effects/ascii.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ return (

## Props

| Name | Type | Default | Description |
| ---------- | ------------------- | ----------------------- | --------------------------------------------------------------- |
| font | String | 'arial' | The font family used to draw the character atlas. |
| characters | String | ` .:,'-^=*+?!\|0#X%WM@` | The characters to sample from, ordered from "empty" to "dense". |
| fontSize | Number | 54 | The font size used to draw the character atlas. |
| cellSize | Number | 16 | The size of each character cell, in pixels. |
| color | ColorRepresentation | '#ffffff' | The color of the characters. |
| invert | Boolean | false | Inverts which characters map to bright vs dark pixels. |
| Name | Type | Default | Description |
| ------------- | ------------------- | ----------------------- | --------------------------------------------------------------- |
| font | String | 'arial' | The font family used to draw the character atlas. |
| characters | String | ` .:,'-^=*+?!\|0#X%WM@` | The characters to sample from, ordered from "empty" to "dense". |
| fontSize | Number | 54 | The font size used to draw the character atlas. |
| cellSize | Number | 16 | The size of each character cell, in pixels. |
| color | ColorRepresentation | '#ffffff' | The color of the characters. |
| invert | Boolean | false | Inverts which characters map to bright vs dark pixels. |
| blendFunction | BlendFunction | BlendFunction.NORMAL | The blend function of this effect. |
| opacity | Number | 1 | The opacity of this effect. |
1 change: 1 addition & 0 deletions docs/effects/bloom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ clamp colors between 0 and 1 again.
| radius | Number | 0.85 | The mipmap blur radius. Only used with mipmapBlur. |
| levels | Number | 8 | The number of mipmap blur levels. Only used with mipmapBlur. |
| opacity | Number | 1 | The opacity of this effect. |
| resolutionScale | Number | 0.5 | The render resolution scale. Ignored if `mipmapBlur` is enabled. |
10 changes: 6 additions & 4 deletions docs/effects/brightness-contrast.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ return (

## Props

| Name | Type | Default | Description |
| ---------- | ------ | ------- | ---------------------- |
| brightness | Number | 0 | Scene brightness shift |
| contrast | Number | 0 | Scene contrast shift |
| Name | Type | Default | Description |
| ------------- | ------------- | ----------------- | ---------------------------------- |
| brightness | Number | 0 | Scene brightness shift |
| contrast | Number | 0 | Scene contrast shift |
| blendFunction | BlendFunction | BlendFunction.SRC | The blend function of this effect. |
| opacity | Number | 1 | The opacity of this effect. |
11 changes: 7 additions & 4 deletions docs/effects/chromatic-aberration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ return (

## Props

| Name | Type | Default | Description |
| ------------- | ------------- | -------------------- | ---------------------------------- |
| offset | Vector2 | | The color offset. |
| blendFunction | BlendFunction | BlendFunction.Normal | The blend function of this effect. |
| Name | Type | Default | Description |
| ---------------- | ------------- | -------------------- | ------------------------------------------------------------------------ |
| offset | Vector2 | [0.001, 0.0005] | The color offset. |
| blendFunction | BlendFunction | BlendFunction.NORMAL | The blend function of this effect. |
| radialModulation | Boolean | false | Scales the offset by the distance from the screen center. |
| modulationOffset | Number | 0.15 | The radial modulation offset, 0 to 1. Only used with `radialModulation`. |
| opacity | Number | 1 | The opacity of this effect. |
1 change: 1 addition & 0 deletions docs/effects/color-average.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ return (
| Name | Type | Default | Description |
| ------------- | ------------- | -------------------- | ---------------------------------- |
| blendFunction | BlendFunction | BlendFunction.NORMAL | The blend function of this effect. |
| opacity | Number | 1 | The opacity of this effect. |
1 change: 1 addition & 0 deletions docs/effects/color-depth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ return (
| ------------- | ------------- | ------- | ------------------------------------------------------------------------------------------------------------------ |
| blendFunction | BlendFunction | | The blend function of this effect. |
| bits | Number | 16 | The virtual amount of color bits. Each color channel effectively uses a fourth of this total; alpha is unaffected. |
| opacity | Number | 1 | The opacity of this effect. |
26 changes: 16 additions & 10 deletions docs/effects/depth-of-field.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { DepthOfField } from '@react-three/postprocessing'

return (
<DepthOfField
focusDistance={0} // where to focus
focalLength={0.02} // focal length
focusDistance={3} // where to focus, in world units
focusRange={2} // depth range that stays in focus, in world units
bokehScale={2} // bokeh size
/>
)
Expand All @@ -25,11 +25,17 @@ return (

## Props

| Name | Type | Default | Description |
| ------------- | ------------- | -------------------- | --------------------------------------------------- |
| blendFunction | BlendFunction | BlendFunction.NORMAL | The blend function of this effect. |
| focusDistance | Number | 0 | The normalized focus distance. Range is [0.0, 1.0]. |
| focalLength | Number | 0.1 | The focal length. Range is [0.0, 1.0]. |
| bokehScale | Number | 1.0 | The scale of the bokeh blur. |
| width | Number | Resizer.width | The render width. |
| height | Number | Resizer.height | The render height. |
| Name | Type | Default | Description |
| --------------- | --------------------------------------- | -------------------- | ------------------------------------------------------------- |
| blendFunction | BlendFunction | BlendFunction.NORMAL | The blend function of this effect. |
| focusDistance | Number | 3 | The focus distance in world units. |
| focusRange | Number | 2 | The focus range in world units. |
| bokehScale | Number | 1 | The scale of the bokeh blur. |
| target | Vector3 | | A world position to keep in focus. Overrides `focusDistance`. |
| depthTexture | `{ texture: Texture, packing: number }` | | A depth texture to use instead of the composer's own. |
| resolutionScale | Number | 0.5 | The render resolution scale. |
| resolutionX | Number | Resolution.AUTO_SIZE | The render width. |
| resolutionY | Number | Resolution.AUTO_SIZE | The render height. |
| opacity | Number | 1 | The opacity of this effect. |

`focalLength`, `worldFocusDistance`, `worldFocusRange`, `width`, `height` and `blur` are deprecated.
1 change: 1 addition & 0 deletions docs/effects/depth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ return (
| ------------- | ------------- | ----------------- | ------------------------------------- |
| blendFunction | BlendFunction | BlendFunction.SRC | The blend function of this effect. |
| inverted | Boolean | false | Whether the depth should be inverted. |
| opacity | Number | 1 | The opacity of this effect. |
1 change: 1 addition & 0 deletions docs/effects/dot-screen.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ return (
| angle | Number | 1 .57 | The angle of the dot pattern. |
| blendFunction | BlendFunction | BlendFunction.NORMAL | The blend function of this effect. |
| scale | Number | 1 .57 | The scale of the dot pattern. |
| opacity | Number | 1 | The opacity of this effect. |
15 changes: 8 additions & 7 deletions docs/effects/fxaa.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ return (

## Props

| Name | Type | Default | Description |
| ----------------- | ------------- | -------------------- | -------------------------------------------------------- |
| blendFunction | BlendFunction | BlendFunction.SRC | The blend function of this effect. |
| minEdgeThreshold | Number | 0.0312 | The minimum edge detection threshold. Range [0.0, 1.0]. |
| maxEdgeThreshold | Number | 0.125 | The maximum edge detection threshold. Range [0.0, 1.0]. |
| subpixelQuality | Number | 0.75 | The subpixel blend quality. Range [0.0, 1.0]. |
| samples | Number | 12 | The maximum amount of edge detection samples. |
| Name | Type | Default | Description |
| ---------------- | ------------- | ----------------- | ------------------------------------------------------- |
| blendFunction | BlendFunction | BlendFunction.SRC | The blend function of this effect. |
| minEdgeThreshold | Number | 0.0312 | The minimum edge detection threshold. Range [0.0, 1.0]. |
| maxEdgeThreshold | Number | 0.125 | The maximum edge detection threshold. Range [0.0, 1.0]. |
| subpixelQuality | Number | 0.75 | The subpixel blend quality. Range [0.0, 1.0]. |
| samples | Number | 12 | The maximum amount of edge detection samples. |
| opacity | Number | 1 | The opacity of this effect. |
8 changes: 5 additions & 3 deletions docs/effects/glitch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ return (
| active | Boolean | true | Turn the effect on and off |
| blendFunction | BlendFunction | BlendFunction.NORMAL | The blend function of this effect. |
| chromaticAberrationOffset | Vector2 | | A chromatic aberration offset. If provided, the glitch effect will influence this offset. |
| delay | Vector2 | | The minimum and maximum delay between glitch activations in seconds. |
| duration | Vector2 | | The minimum and maximum duration of a glitch in seconds. |
| strength | Vector2 | | The strength of weak and strong glitches. |
| delay | Vector2 | [1.5, 3.5] | The minimum and maximum delay between glitch activations in seconds. |
| duration | Vector2 | [0.6, 1.0] | The minimum and maximum duration of a glitch in seconds. |
| strength | Vector2 | [0.3, 1.0] | The strength of weak and strong glitches. |
| perturbationMap | Texture | | A perturbation map. If none is provided, a noise texture will be created. |
| dtSize | Number | 64 | The size of the generated noise map. Will be ignored if a perturbation map is provided. |
| columns | Number | 0.05 | The scale of the blocky glitch columns. |
| ratio | Number | 0.85 | The threshold for strong glitches. |
| mode | GlitchMode | GlitchMode.SPORADIC | The glitch mode. Ignored while `active` is false. |
| opacity | Number | 1 | The opacity of this effect. |
Loading
Loading