Skip to content
🎉 Angular Three v4 is here! Read the announcement

NgtpTiltShift2

TiltShift2 is an alternative tilt-shift implementation that provides more control over the focus area using start and end points in screen space.

import { NgtpEffectComposer, NgtpTiltShift2 } from 'angular-three-postprocessing';
@Component({
template: `
<ngtp-effect-composer>
<ngtp-tilt-shift-2 [options]="{
blur: 0.15,
taper: 0.5
}" />
</ngtp-effect-composer>
`,
imports: [NgtpEffectComposer, NgtpTiltShift2],
})
export class SceneGraph {}
PropertyTypeDefaultDescription
blurnumber0.15Blur intensity
tapernumber0.5Taper factor for blur falloff
start[x, y][0.5, 0.0]Start point in screen space (0-1)
end[x, y][0.5, 1.0]End point in screen space (0-1)
samplesnumber10Number of blur samples
direction[x, y][1, 1]Blur direction
@Component({
template: `
<ngt-mesh [position]="[0, 0, 0]">
<ngt-torus-knot-geometry *args="[1, 0.3, 128, 32]" />
<ngt-mesh-standard-material color="coral" />
</ngt-mesh>
<ngtp-effect-composer>
<!-- Diagonal focus from bottom-left to top-right -->
<ngtp-tilt-shift-2 [options]="{
blur: 0.2,
taper: 0.6,
start: [0.2, 0.8],
end: [0.8, 0.2],
samples: 15
}" />
</ngtp-effect-composer>
`,
imports: [NgtpEffectComposer, NgtpTiltShift2, NgtArgs],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class SceneGraph {}
@Component({
template: `
<ngtp-effect-composer>
<!-- Horizontal focus band in the middle -->
<ngtp-tilt-shift-2 [options]="{
blur: 0.25,
start: [0, 0.5],
end: [1, 0.5],
taper: 0.4
}" />
</ngtp-effect-composer>
`,
imports: [NgtpEffectComposer, NgtpTiltShift2],
})
export class SceneGraph {}
FeatureTiltShiftTiltShift2
Focus controlVertical offset onlyStart/end points (any angle)
FlexibilitySimpleMore customizable
Use caseStandard miniatureCustom focus areas
  • start and end define a line in screen space (0-1 coordinates)
  • The focus area is perpendicular to this line
  • Higher samples improves quality but reduces performance
  • taper controls how quickly the blur fades from the focus line
  • Use for creative focus effects beyond traditional tilt-shift