UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

14 lines (12 loc) 282 B
var computeSplatSource = ` struct Splat { index: u32, uv: vec2i } var<private> splat: Splat; fn setSplat(idx: u32) { splat.index = idx; splat.uv = vec2i(i32(idx % uniforms.splatTextureSize), i32(idx / uniforms.splatTextureSize)); } `; export { computeSplatSource as default };