EaglerForge/sources/resources/assets/eagler/glsl/deferred/clouds_shapes.fsh

36 lines
1.3 KiB
GLSL

#line 2
/*
* Copyright (c) 2023 lax1dude. All Rights Reserved.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
precision lowp int;
precision mediump float;
precision mediump sampler3D;
in vec2 v_position2f;
layout(location = 0) out vec4 output4f;
uniform sampler3D u_inputTexture;
uniform float u_textureLevel1f;
uniform float u_textureLod1f;
uniform vec2 u_sampleWeights2f;
void main() {
float objsample = textureLod(u_inputTexture, vec3(v_position2f, u_textureLevel1f), u_textureLod1f).r;
output4f = vec4(objsample * u_sampleWeights2f.x, 0.0, 0.0, objsample * u_sampleWeights2f.y + 1.0);
}