playcanvas
Version:
Open-source WebGL/WebGPU 3D engine for the web
8 lines (6 loc) • 313 B
JavaScript
var glslStreamDecl = `
uniform highp {sampler} {name};
{returnType} load{funcName}() { return texelFetch({name}, splat.uv, 0); }
{returnType} load{funcName}WithIndex(uint index) { return texelFetch({name}, ivec2(index % splatTextureSize, index / splatTextureSize), 0); }
`;
export { glslStreamDecl as default };