Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Cg
- void vshader(
- float4 vtx_position : POSITION,
- float2 vtx_texcoord0 : TEXCOORD0,
- out float4 l_position : POSITION,
- out float2 l_texcoord0 : TEXCOORD0,
- uniform float4 texpad_tex,
- uniform float4x4 mat_modelproj)
- {
- l_position=mul(mat_modelproj, vtx_position);
- l_texcoord0 = vtx_position.xz * texpad_tex.xy + texpad_tex.xy;
- }
- void fshader(float2 l_texcoord0 : TEXCOORD0,
- out float4 o_color : COLOR,
- uniform sampler2D k_tex : TEXUNIT0,
- uniform float4 k_speed)
- {
- //float4 c = tex2D(k_tex, float2((l_texcoord0.x-0.5)/k_speed[0]+0.5, (l_texcoord0.y-0.5)/k_speed[0]+0.5));
- //float4 c = tex2D(k_tex, float2((l_texcoord0.x-0.5)/2+0.5, (l_texcoord0.y-0.5)/2+0.5));
- float4 c = tex2D(k_tex, float2(l_texcoord0.x+0.5, l_texcoord0.y+0.5));
- o_color=float4(c[0], c[2], c[1], c[3]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement