Stone

석재 질감

Adds marbled stone patterning, relief shading, and surface distortion to the content below.

Also known as: Stonemarbled stonestone relief

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, ImageTexture, Stone } from 'shaders/react'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: 320 }} disableTelemetry>
      <ImageTexture
        objectFit="cover"
        url="/samples/poster.jpg" />
      <Stone />
    </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, ImageTexture, Stone } from 'shaders/vue'
</script>

<template>
  <Shader style="width: 100%; height: 320px" :disable-telemetry="true">
    <ImageTexture
      object-fit="cover"
      url="/samples/poster.jpg"/>
    <Stone/>
  </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, ImageTexture, Stone } from 'shaders/svelte'
</script>

<Shader style="width: 100%; height: 320px" disableTelemetry>
  <ImageTexture
    objectFit="cover"
    url="/samples/poster.jpg" />
  <Stone />
</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, ImageTexture, Stone } from 'shaders/solid'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: '320px' }} disableTelemetry>
      <ImageTexture
        objectFit="cover"
        url="/samples/poster.jpg" />
      <Stone />
    </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/poster.jpg',
      },
    },
    {
      type: 'Stone',
    }
  ]
}, { disableTelemetry: true })

Props · Stone

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

NameValueDefaultRange / optionsDescription
intensityIntensity0.50 – 1 (step 0.01)Strength of the relief shading applied to the child content
scaleScale10.1 – 8 (step 0.05)Scale of the pattern — lower = larger features, higher = finer grain
contrastContrast0-1 – 2 (step 0.05)Contrast of the texture — negative flattens it into a subtle overlay
distortionDistortion0.150 – 1 (step 0.01)Surface distortion — warps the child along the texture like carved relief
seedSeed00 – 100 (step 1)Random seed for pattern variation

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

It makes a flat image feel carved into or pressed against stone. A marble-like pattern crosses the surface, while relief shading emphasizes the form.

`intensity` defaults to 0.5 and ranges from 0 to 1 to set relief shading. `scale` defaults to 1 and ranges from 0.1 to 8 to change pattern size; lower values create larger features. `contrast` defaults to 0 and ranges from -1 to 2, while `distortion` defaults to 0.15 and ranges from 0 to 1 to adjust texture contrast and surface warping. `seed` defaults to 0 and ranges from 0 to 100 to vary the pattern.

Place an image or shape underneath it first. Pair it with `Wool` or `Paper` to compare materials, but strong distortion can change the outline of text or a detailed logo.

When to use

Use it for stone or marble mockups, carved logos, and graphics that need a material surface. Avoid it when the original outline of a logo or lettering must be preserved.

Open as page ↗