|
|
这是《Shaders.for.Game.Programmers.and.Artists》一书中80面提到的一个Pixel shader:
float4x4 color_filter;
sampler Texture0;
float4 ps_main(float2 texCoord: TEXCOORD0) : COLOR
{
// Read the source color
float4 col = tex2D(Texture0, texCoord);
float Intensity;
// Compute the intensity or heat of the pixel
// In other words, compute the grayscale value of
// the pixel.
Intensity = dot(col,float4(0.299,0.587,0.184,0));
// Use the intensity to lookup the heat color table
return tex1D(Texture_Heat,Intensity);
}
请问这个Texture_Heat也就是这个the heat color table是什么样的,能给个图看看么?谢谢了。 |
|