UNPKG

playcanvas

Version:

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

27 lines (23 loc) 437 B
var compose_ssao_default = ` #ifdef SSAO #define SSAO_TEXTURE #endif #if DEBUG_COMPOSE == ssao #define SSAO_TEXTURE #endif #ifdef SSAO_TEXTURE uniform sampler2D ssaoTexture; float dSsao; vec3 applySsao(vec3 color, vec2 uv) { dSsao = texture2DLod(ssaoTexture, uv, 0.0).r; #ifdef SSAO return color * dSsao; #else return color; #endif } #endif `; export { compose_ssao_default as default };