playcanvas
Version:
PlayCanvas WebGL game engine
27 lines (22 loc) • 510 B
JavaScript
var composeSsaoPS = `
var ssaoTexture: texture_2d<f32>;
var ssaoTextureSampler: sampler;
var<private> dSsao: f32;
fn applySsao(color: vec3f, uv: vec2f) -> vec3f {
dSsao = textureSampleLevel(ssaoTexture, ssaoTextureSampler, uv, 0.0).r;
return color * dSsao;
return color;
}
`;
export { composeSsaoPS as default };