I've been researching a game's engine for the last few months and after extracting the DX9 bytecode, have begun examining the game's shaders. I mainly worked with OpenGL so some of the syntax or way of doing things is new to me.
Anyway, this is a 5x5 gaussian blur pixel shader (3.0). Can anyone explain what is going on with the texture coords declaration? Does this mean 4 coordinates are being sent into the pixel shader? Or is the same texture coordinate being reused?
def c0, 0.120259, 0.162103, 0.089216, 0.000000
dcl_texcoord0 v0.xy
dcl_texcoord1 v1
dcl_texcoord2 v2
dcl_texcoord3 v3
dcl_texcoord4 v4
dcl_2d s0
tex_pp r0, v1.zwzw, s0
mul r0, r0, c0.x
tex_pp r1, v1, s0
mad_pp r0, r1, c0.y, r0
tex_pp r1, v2, s0
mad_pp r0, r1, c0.x, r0
tex_pp r1, v2.zwzw, s0
mad_pp r0, r1, c0.x, r0
tex_pp r1, v3, s0
mad_pp r0, r1, c0.x, r0
tex_pp r1, v3.zwzw, s0
mad_pp r0, r1, c0.z, r0
tex_pp r1, v4, s0
mad_pp r0, r1, c0.z, r0
tex_pp r1, v4.zwzw, s0
mad_pp r0, r1, c0.z, r0
tex_pp r1, v0, s0
mad_pp oC0, r1, c0.z, r0
end