Vignette

Darken the edges of the scene to make the center pop.

Vignette is an effect that darkens the edges of the scene to make the center pop.

Usage

<script setup lang="ts">
import { EffectComposerPmndrs, VignettePmndrs } from '@tresjs/post-processing'
</script>

<template>
  <TresCanvas>
    <TresPerspectiveCamera :position="[5, 5, 5]" />

    <!-- Your scene -->

    <Suspense>
      <EffectComposerPmndrs>
        <VignettePmndrs
          :darkness="0.9"
          :offset="0.2"
        />
      </EffectComposerPmndrs>
    </Suspense>
  </TresCanvas>
</template>

Props

PropDescriptionDefault
techniqueWhether the noise should be multiplied with the input color.VignetteTechnique.DEFAULT
blendFunctionThe blend function to use.BlendFunction.NORMAL
offsetThe offset value.0.5
darknessThe darkness value.0.5

Further Reading

For more details, see the VignetteEffect documentation.