hdr_bloom.glsl
资源名称:3dwind2.0.rar [点击查看]
上传用户:xhbjoy
上传日期:2014-10-07
资源大小:38068k
文件大小:0k
源码类别:
游戏引擎
开发平台:
Visual C++
- uniform sampler2D inRTT;
- uniform vec4 sampleOffsets[15];
- uniform vec4 sampleWeights[15];
- varying vec2 uv;
- void main(void)
- {
- vec4 accum = vec4(0.0, 0.0, 0.0, 1.0);
- vec2 sampleUV;
- for( int i = 0; i < 15; i++ )
- {
- // Sample from adjacent points, 7 each side and central
- sampleUV = uv + sampleOffsets[i].xy;
- accum += sampleWeights[i] * texture2D(inRTT, sampleUV);
- }
- gl_FragColor = accum;
- }