media @ VU
[]
readme
course
preface
I
1
2
II
3
4
III
5
6
7
IV
8
9
10
V
11
12
afterthoughts
appendix
references
examples
resources
_
// identity
float time=0;
float sampleDist = 1.0f/512.0f; // distance one pixel in u/v
sampler2D image : register(s0);
float4 main(
float4 Pos : POSITION,
float2 texCoord: TEXCOORD0) : COLOR
{
float4 img = tex2D(image, texCoord);
// convert to gray
float4 sum = dot(img, float4(0.30f, 0.59f, 0.11f, 0.0f));
sum.a=img.a; // keep alpha
return lerp(img,sum,time);
}
[]
readme
course
preface
I
1
2
II
3
4
III
5
6
7
IV
8
9
10
V
11
12
afterthoughts
appendix
references
examples
resources
_
(C) A. Eliëns
9/8/2006
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.