Bloom_ps20.hlsl
资源名称:3dwind2.0.rar [点击查看]
上传用户:xhbjoy
上传日期:2014-10-07
资源大小:38068k
文件大小:1k
源码类别:
游戏引擎
开发平台:
Visual C++
- sampler Blur1: register(s1);
- sampler RT: register(s0);
- float luminance(float3 c)
- {
- return dot( c, float3(0.3, 0.59, 0.11) );
- }
- float4 main(float2 texCoord: TEXCOORD0) : COLOR {
- float4 sharp = tex2D(RT, texCoord);
- float4 blur = tex2D(Blur1, texCoord);
- return ( sharp + blur * 1.8 ) / 2;
- // float4 color = lerp( sharp, blur, 0.4f );
- // return color;
- /*
- return ( sharp + blur * 1.8 ) / 2 +
- luminance(blur) *
- float4( 0.5, 0.5, 0.5, 0) +
- luminance(sharp) *
- float4( 0.3, 0.3, 0.3, 0);
- */
- /*
- return ( sharp + blur * 0.9) / 2 +
- luminance(blur) * float4(0.1, 0.15, 0.7, 0);
- */
- /*
- return ( sharp + blur * 0.9) / 2 +
- luminance(blur) * float4(0.1, 0.15, 0.7, 0);
- */
- // float4 retColor = luminance( sharp ) +
- // luminance( blur ) + blur / 2;
- // return retColor;
- }