<@include gpu/Config.slh@> <$VERSION_HEADER$> // Generated on <$_SCRIBE_DATE$> // // ssao_debugOcclusion.frag // // Created by Sam Gateau on 1/1/16. // Copyright 2016 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // <@include ssao.slh@> <$declareAmbientOcclusion()$> <$declareFetchDepthPyramidMap()$> <$declareSamplingDisk()$> <$declareEvalObscurance()$> <$declarePackOcclusionDepth()$> <@include gpu/Color.slh@> <$declareColorWheel()$> struct DebugParams{ vec4 pixelInfo; }; LAYOUT(binding=RENDER_UTILS_BUFFER_SSAO_DEBUG_PARAMS) uniform debugAmbientOcclusionBuffer { DebugParams debugParams; }; vec2 getDebugCursorTexcoord(){ return debugParams.pixelInfo.xy; } layout(location=0) out vec4 outFragColor; void main(void) { // Stereo side info based on the real viewport size of this pass vec2 sideDepthSize = getDepthTextureSideSize(0); // Pixel Debugged vec2 cursorUV = getDebugCursorTexcoord(); vec2 cursorPixelPos = cursorUV * sideDepthSize; ivec2 fragUVPos = ivec2(cursorPixelPos); // TODO outFragColor = packOcclusionOutput(0.0, 0.0, vec3(0.0, 0.0, 1.0)); }