Skip to content

Commit 6f90fa1

Browse files
committed
docs: use SMAA to counteract AA artifact caused by Outline
1 parent b3cc291 commit 6f90fa1

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

apps/kitchen-sink/src/app/postprocessing/outline/experience.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, signal } from '@angular/core';
2-
import { NgtArgs, NgtHexify, NgtSelect, NgtSelection } from 'angular-three';
3-
import { NgtpEffectComposer, NgtpOutline } from 'angular-three-postprocessing';
2+
import { NgtArgs, NgtSelect, NgtSelection } from 'angular-three';
3+
import { NgtpEffectComposer, NgtpOutline, NgtpSMAA } from 'angular-three-postprocessing';
44
import { NgtsOrbitControls } from 'angular-three-soba/controls';
5+
import { KernelSize } from 'postprocessing';
56

67
/**
78
* There are multiple ways to use the Outline effect.
@@ -50,16 +51,18 @@ import { NgtsOrbitControls } from 'angular-three-soba/controls';
5051
</ngt-mesh>
5152
</ngt-group>
5253
53-
<ngtp-effect-composer [options]="{ autoClear: false }">
54-
<ngtp-outline [options]="{ edgeStrength: 100, pulseSpeed: 0 }" />
54+
<ngtp-effect-composer [options]="{ autoClear: false, multisampling: 0 }">
55+
<ngtp-outline [options]="{ edgeStrength: 2.5, pulseSpeed: 0, blur: true, kernelSize: KernelSize.SMALL }" />
56+
<ngtp-smaa />
5557
</ngtp-effect-composer>
5658
`,
5759
schemas: [CUSTOM_ELEMENTS_SCHEMA],
5860
changeDetection: ChangeDetectionStrategy.OnPush,
5961
host: { class: 'postprocessing-sample' },
6062
hostDirectives: [NgtSelection],
61-
imports: [NgtsOrbitControls, NgtSelect, NgtHexify, NgtpEffectComposer, NgtpOutline, NgtArgs],
63+
imports: [NgtsOrbitControls, NgtSelect, NgtpEffectComposer, NgtpOutline, NgtArgs, NgtpSMAA],
6264
})
6365
export class Experience {
66+
KernelSize = KernelSize;
6467
hovered = signal(false);
6568
}

0 commit comments

Comments
 (0)