mirror of
https://github.com/overte-org/overte.git
synced 2025-06-17 17:40:17 +02:00
32 lines
1 KiB
Text
32 lines
1 KiB
Text
<@include gpu/Config.slh@>
|
|
<$VERSION_HEADER$>
|
|
// BloomApply.frag
|
|
// Mix the three gaussian blur textures.
|
|
//
|
|
// Created by Olivier Prat on 10/09/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 BloomApply.shared.slh@>
|
|
<@include render-utils/ShaderConstants.h@>
|
|
|
|
LAYOUT(binding=0) uniform sampler2D blurMap0;
|
|
LAYOUT(binding=1) uniform sampler2D blurMap1;
|
|
LAYOUT(binding=2) uniform sampler2D blurMap2;
|
|
|
|
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) {
|
|
vec4 blur0 = texture(blurMap0, varTexCoord0);
|
|
vec4 blur1 = texture(blurMap1, varTexCoord0);
|
|
vec4 blur2 = texture(blurMap2, varTexCoord0);
|
|
|
|
outFragColor = vec4(blur0.rgb*parameters._intensities.x + blur1.rgb*parameters._intensities.y + blur2.rgb*parameters._intensities.z, 1.0f);
|
|
}
|