import { dot } from "@drift/math";
shader Grayscale {
props {
texture: sampler2d;
}
fragment (uv: vec2) -> color {
const weights: vec3 = vec3(0.299, 0.587, 0.114);
let sample = texture.sample(uv);
let gray = dot(sample.rgb, weights);
return color(gray, gray, gray, sample.a);
}
}Drift
Shading language for general-purpose developers
- Ukraine
Pinned Loading
Repositories
Showing 5 of 5 repositories
People
This organization has no public members. You must be a member to see who’s a part of this organization.
Top languages
Loading…
Most used topics
Loading…