playcanvas
Version:
PlayCanvas WebGL game engine
30 lines (23 loc) • 701 B
JavaScript
var composeSsaoPS = /* wgsl */ `
var ssaoTexture: texture_2d<f32>;
var ssaoTextureSampler: sampler;
// Global variable for debug
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 };