I need to know is it possible to get which pixel I am manipulating in pixel shading.
if it is not, then can I save a varialbe which is always static in the shader, that means, the value will be changed and saved after one pixel, and will be used again for another pixel.
thanks a lot

how to get position(lines and columns) of a pixel from HLSL?
ron nash
You could look into the VPOS register in ps_3_0, but otherwise the position information is not accessible in the pixel shader.
A common work-around is to have the VS pass the projected screen position (remember to add a viewport transform to go from projection space to screen-space) through to the PS as a texture coordinate.
You can't have a persistant variable between shader invocations, so your idea about incrementing a variable wouldn't work.
hth
Jack