<@include gpu/Config.slh@> <$VERSION_HEADER$> // BloomThreshold.frag // Perform a soft threshold on an input texture and downsample to half size in one go. // // Created by Olivier Prat on 09/26/2017 // Copyright 2017 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 BloomThreshold.shared.slh@> <@include render-utils/ShaderConstants.h@> LAYOUT(binding=RENDER_UTILS_TEXTURE_BLOOM_COLOR) uniform sampler2D colorMap; LAYOUT_STD140(binding=RENDER_UTILS_BUFFER_BLOOM_PARAMS) uniform parametersBuffer { Parameters parameters; }; layout(location=0) in vec2 varTexCoord0; layout(location=0) out vec4 outFragColor; void main(void) { vec2 startUv = varTexCoord0; vec4 maskedColor = vec4(0,0,0,0); for (int y=0 ; y