Blur1_ps20.hlsl
资源名称:3dwind2.0.rar [点击查看]
上传用户:xhbjoy
上传日期:2014-10-07
资源大小:38068k
文件大小:1k
源码类别:
游戏引擎
开发平台:
Visual C++
- sampler Blur0: register(s0);
- // Simple blur filter
- float4 main(float2 texCoord: TEXCOORD0) : COLOR {
- float2 samples[12] = {
- -0.326212, -0.405805,
- -0.840144, -0.073580,
- -0.695914, 0.457137,
- -0.203345, 0.620716,
- 0.962340, -0.194983,
- 0.473434, -0.480026,
- 0.519456, 0.767022,
- 0.185461, -0.893124,
- 0.507431, 0.064425,
- 0.896420, 0.412458,
- -0.321940, -0.932615,
- -0.791559, -0.597705,
- };
- float4 sum = tex2D(Blur0, texCoord);
- for (int i = 0; i < 12; i++){
- sum += tex2D(Blur0, texCoord + 0.025 * samples[i]);
- }
- return sum / 13;
- }