PosterizeFP.cg
资源名称:3dwind2.0.rar [点击查看]
上传用户:xhbjoy
上传日期:2014-10-07
资源大小:38068k
文件大小:0k
源码类别:
游戏引擎
开发平台:
Visual C++
- sampler RT : register(s0);
- float4 Posterize_ps (float2 iTexCoord : TEXCOORD0) : COLOR
- {
- float nColors = 8;
- float gamma = 0.6;
- float4 texCol = tex2D(RT, iTexCoord);
- float3 tc = texCol.xyz;
- tc = pow(tc, gamma);
- tc = tc * nColors;
- tc = floor(tc);
- tc = tc / nColors;
- tc = pow(tc,1.0/gamma);
- return float4(tc,texCol.w);
- }