Film Grain

필름 그레인

Overlays fine grain, weighted toward darker areas, for an analog film texture.

Also known as: FilmGrainfilm grainfilm noise

Moves in browsers that support WebGPU

This device could not render the demo — showing a still

React
// Renders only in browsers with WebGPU.
// /samples/… are this site’s sample files — point them at your own image or video.
import { Shader, FilmGrain, ImageTexture } from 'shaders/react'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: 320 }} disableTelemetry>
      <ImageTexture
        objectFit="cover"
        url="/samples/photo.jpg" />
      <FilmGrain />
    </Shader>
  )
}
Vue
<!-- Renders only in browsers with WebGPU. -->
<!-- /samples/… are this site’s sample files — point them at your own image or video. -->
<script setup lang="ts">
import { Shader, FilmGrain, ImageTexture } from 'shaders/vue'
</script>

<template>
  <Shader style="width: 100%; height: 320px" :disable-telemetry="true">
    <ImageTexture
      object-fit="cover"
      url="/samples/photo.jpg"/>
    <FilmGrain/>
  </Shader>
</template>
Svelte
<!-- Renders only in browsers with WebGPU. -->
<!-- /samples/… are this site’s sample files — point them at your own image or video. -->
<script>
  import { Shader, FilmGrain, ImageTexture } from 'shaders/svelte'
</script>

<Shader style="width: 100%; height: 320px" disableTelemetry>
  <ImageTexture
    objectFit="cover"
    url="/samples/photo.jpg" />
  <FilmGrain />
</Shader>
Solid
// Renders only in browsers with WebGPU.
// /samples/… are this site’s sample files — point them at your own image or video.
import { Shader, FilmGrain, ImageTexture } from 'shaders/solid'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: '320px' }} disableTelemetry>
      <ImageTexture
        objectFit="cover"
        url="/samples/photo.jpg" />
      <FilmGrain />
    </Shader>
  )
}
JavaScript
// Renders only in browsers with WebGPU.
// /samples/… are this site’s sample files — point them at your own image or video.
// expects <canvas id="canvas" style="width:100%;height:320px"></canvas> on the page
import { createShader } from 'shaders/js'

const shader = await createShader(document.getElementById("canvas"), {
  components: [
    {
      type: 'ImageTexture',
      props: {
        objectFit: 'cover',
        url: '/samples/photo.jpg',
      },
    },
    {
      type: 'FilmGrain',
    }
  ]
}, { disableTelemetry: true })

Props · FilmGrain

Changes apply to the demo above and to the code tabs. Descriptions come from the library registry (MIT).

NameValueDefaultRange / optionsDescription
strengthStrength0.50 – 1 (step 0.025)Intensity of the film grain noise
biasBias20 – 10 (step 0.1)Concentrates grain in darker areas. Higher values focus grain more heavily on shadows; 0 applies grain uniformly.
animatedAnimatedfalse—When enabled, the grain pattern changes each frame for a dynamic film effect

Every component also takes blendMode · opacity · visible · maskSource/maskType · boundingBox · id

It feels like film particles floating over a smooth digital picture. More grain gathers in the shadows, giving the image a textured, printed surface.

`strength` defaults to 0.5 and ranges from 0 to 1 to set grain intensity. `bias` defaults to 2 and ranges from 0 to 10 to control how strongly grain concentrates in dark areas. `animated` defaults to `false`; turn it on to change the grain pattern each frame.

Place it above an image or video layer. Combine it with `VHS` or `CRTScreen` for an analog-film look; `Paper` adds a different surface texture. Lower the grain when small text or a clean product screen needs to stay clear.

When to use

Use it to give photos or video a cinematic texture or to soften a flat background. Avoid it on text-heavy dashboards or images with fine product detail.

Open as page ↗