mirror of
https://github.com/overte-org/overte.git
synced 2025-04-26 15:36:21 +02:00
24 lines
972 B
GLSL
24 lines
972 B
GLSL
#version 120
|
|
|
|
//
|
|
// vertical_blur.frag
|
|
// fragment shader
|
|
//
|
|
// Created by Andrzej Kapolka on 8/14/13.
|
|
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
|
|
//
|
|
|
|
// the texture containing the horizontally blurred color
|
|
uniform sampler2D originalTexture;
|
|
|
|
void main(void) {
|
|
float dt = dFdy(gl_TexCoord[0].t);
|
|
gl_FragColor = (texture2D(originalTexture, gl_TexCoord[0].st + vec2(0.0, dt * -7.5)) +
|
|
texture2D(originalTexture, gl_TexCoord[0].st + vec2(0.0, dt * -5.5)) +
|
|
texture2D(originalTexture, gl_TexCoord[0].st + vec2(0.0, dt * -3.5)) +
|
|
texture2D(originalTexture, gl_TexCoord[0].st + vec2(0.0, dt * -1.5)) +
|
|
texture2D(originalTexture, gl_TexCoord[0].st + vec2(0.0, dt * 1.5)) +
|
|
texture2D(originalTexture, gl_TexCoord[0].st + vec2(0.0, dt * 3.5)) +
|
|
texture2D(originalTexture, gl_TexCoord[0].st + vec2(0.0, dt * 5.5)) +
|
|
texture2D(originalTexture, gl_TexCoord[0].st + vec2(0.0, dt * 7.5))) / 8.0;
|
|
}
|