Skip to content

Pixelation

Pixelation is an effect that pixelates the scene.

Usage

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

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

    <!-- Your scene -->

    <Suspense>
      <EffectComposerPmndrs>
        <PixelationPmndrs :granularity="15" />
      </EffectComposerPmndrs>
    </Suspense>
  </TresCanvas>
</template>

Props

PropDescriptionDefault
granularityThe granularity of the pixels.30

Further Reading

For more details, see the PixelationEffect documentation