glowShader.sha 525 B

123456789101112131415161718192021
  1. //Cg
  2. //
  3. void vshader(float4 vtx_position : POSITION,
  4. float2 vtx_texcoord0 : TEXCOORD0,
  5. uniform float4x4 mat_modelproj,
  6. out float4 l_position : POSITION,
  7. out float2 l_texcoord0 : TEXCOORD0)
  8. {
  9. l_position=mul(mat_modelproj, vtx_position);
  10. l_texcoord0=vtx_texcoord0;
  11. }
  12. void fshader(float2 l_texcoord0 : TEXCOORD0,
  13. uniform sampler2D tex_0 : TEXUNIT0,
  14. out float4 o_color : COLOR)
  15. {
  16. float4 texColor=tex2D(tex_0, l_texcoord0);
  17. o_color=texColor*2*(texColor.w - 0.5);
  18. }