From 9f29687b0238727db502d4611abcd2cd82689c9a Mon Sep 17 00:00:00 2001 From: alvarosabu Date: Fri, 4 Oct 2024 16:17:21 +0200 Subject: [PATCH] docs: smaa --- docs/.vitepress/config.ts | 4 +- .../theme/components/three/SMAAThreeDemo.vue | 53 +++++++++++++++++++ docs/components.d.ts | 3 +- docs/guide/three/smaa.md | 29 ++++++++++ 4 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 docs/.vitepress/theme/components/three/SMAAThreeDemo.vue create mode 100644 docs/guide/three/smaa.md diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 1d9b77b1..64ceefa5 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -63,9 +63,9 @@ export default defineConfig({ items: [ { text: 'Glitch', link: '/guide/three/glitch' }, { text: 'Halftone', link: '/guide/three/halftone' }, - { text: 'Outline', link: '/guide/three/outline' }, + { text: 'SMAA', link: '/guide/three/smaa' }, { text: 'Pixelation', link: '/guide/three/pixelation' }, - { text: 'Vignette', link: '/guide/three/vignette' }, + { text: 'Unreal Bloom', link: '/guide/three/unreal-bloom' }, ], }, ], diff --git a/docs/.vitepress/theme/components/three/SMAAThreeDemo.vue b/docs/.vitepress/theme/components/three/SMAAThreeDemo.vue new file mode 100644 index 00000000..98cdf416 --- /dev/null +++ b/docs/.vitepress/theme/components/three/SMAAThreeDemo.vue @@ -0,0 +1,53 @@ + + + diff --git a/docs/components.d.ts b/docs/components.d.ts index 12af72a3..de89da5d 100644 --- a/docs/components.d.ts +++ b/docs/components.d.ts @@ -9,7 +9,7 @@ declare module 'vue' { export interface GlobalComponents { BlenderCube: typeof import('./.vitepress/theme/components/BlenderCube.vue')['default'] BloomDemo: typeof import('./.vitepress/theme/components/pmdrs/BloomDemo.vue')['default'] - copy: typeof import('./.vitepress/theme/components/three/PixelationThreeDemo copy.vue')['default'] + copy: typeof import('./.vitepress/theme/components/three/HalftoneThreeDemo copy.vue')['default'] DepthOfFieldDemo: typeof import('./.vitepress/theme/components/pmdrs/DepthOfFieldDemo.vue')['default'] DocsDemo: typeof import('./.vitepress/theme/components/DocsDemo.vue')['default'] GlitchDemo: typeof import('./.vitepress/theme/components/pmdrs/GlitchDemo.vue')['default'] @@ -23,6 +23,7 @@ declare module 'vue' { PixelationThreeDemo: typeof import('./.vitepress/theme/components/three/PixelationThreeDemo.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] + SMAAThreeDemo: typeof import('./.vitepress/theme/components/three/SMAAThreeDemo.vue')['default'] VignetteDemo: typeof import('./.vitepress/theme/components/pmdrs/VignetteDemo.vue')['default'] } } diff --git a/docs/guide/three/smaa.md b/docs/guide/three/smaa.md new file mode 100644 index 00000000..eac529de --- /dev/null +++ b/docs/guide/three/smaa.md @@ -0,0 +1,29 @@ +# SMAA + + + + + +SMAA (Subpixel Morphological Antialiasing) is an antialiasing technique that aims to reduce the visual defects that occur when high-frequency detail is displayed on a lower-resolution screen. This effect can be used to smooth out jagged edges in your 3D scenes. + +## Usage + +```vue + + + +``` + +## Props + +| Prop | Description | Default | +|---------|---------------------------------------------------------------------------------------------------|---------------------------------| +| `width` | The width of the render target. If not provided, it defaults to the width of the renderer. | | +| `height`| The height of the render target. If not provided, it defaults to the height of the renderer. | |