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

NgtpBrightnessContrast

The brightness/contrast effect allows you to adjust the overall brightness and contrast of your scene, useful for color correction and stylization.

import { NgtpEffectComposer, NgtpBrightnessContrast } from 'angular-three-postprocessing';
@Component({
template: `
<ngtp-effect-composer>
<ngtp-brightness-contrast [options]="{
brightness: 0.1,
contrast: 0.2
}" />
</ngtp-effect-composer>
`,
imports: [NgtpEffectComposer, NgtpBrightnessContrast],
})
export class SceneGraph {}
PropertyTypeDefaultDescription
brightnessnumber0Brightness adjustment (-1 to 1)
contrastnumber0Contrast adjustment (-1 to 1)
@Component({
template: `
<ngt-mesh>
<ngt-box-geometry />
<ngt-mesh-standard-material color="coral" />
</ngt-mesh>
<ngtp-effect-composer>
<ngtp-brightness-contrast [options]="{
brightness: 0.05,
contrast: 0.3
}" />
</ngtp-effect-composer>
`,
imports: [NgtpEffectComposer, NgtpBrightnessContrast],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class SceneGraph {}
  • Values of 0 mean no change
  • Positive brightness values lighten the image, negative values darken it
  • Positive contrast values increase contrast, negative values decrease it
  • Combine with other color effects like NgtpHueSaturation for complete color grading