一个RGB颜色的亮度和各个分量之间的关系的公式为:GrayValue = 0.3 * R + 0.59*G  + 0.11 *B 
sampler2D Texture0;
float4 ps_main( float2 texCoord : TEXCOORD0 ) : COLOR
{
float4 _inColor = tex2D( Texture0, texCoord );
float h = 0.3*_inColor.x + 0.59*_inColor.y + 0.11*_inColor.z;
float4 _outColor = float4(h,h,h,1.0);
return _outColor;
}

 

http://www.gamerendering.com/2008/12/20/radial-blur-filter/

相关文章:

  • 2021-05-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
  • 2022-12-23
  • 2022-01-08
  • 2021-07-15
猜你喜欢
  • 2021-09-21
  • 2022-12-23
  • 2021-06-18
  • 2021-12-12
  • 2022-01-11
  • 2021-08-11
  • 2022-12-23
相关资源
相似解决方案