Files
Shyotl 1d1947c51a Reworked LLPostProcess and implemented FBO support (much faster if multiple post shaders are enabled, or need a lot of passes).
Tweaked LLRenderTarget to support depth textures if FBO support is lacking.
Prefer LLRenderTarget::getFBO() over LLRenderTarget::sUseFBO when determining how to handle a specific LLRenderTarget object. (Decoupling to simplify logic without having to track a global)
2012-07-29 04:28:11 -05:00

24 lines
475 B
GLSL

/**
* @file colorFilterF.glsl
*
* Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
* $License$
*/
#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragColor;
#endif
uniform sampler2DRect tex0;
uniform int layerCount;
VARYING vec2 vary_texcoord0;
void main(void)
{
vec3 color = pow(floor(pow(vec3(texture2D(tex0, vary_texcoord0.st)),vec3(.6)) * layerCount)/layerCount,vec3(1.66666));
gl_FragColor = vec4(color, 1.0);
}