Hello,
Suppose pixel 0 wants to write to pixel 5 in a pixel shader... then this
cannot happen on DX9 graphics cards.
pixel 0 can only write to pixel 0.
However
What if a second pass is used...
pixel 0 could output a 5 to indicate to the next pass that it's output must
go to pixel 5.
So on the next pass... a vertex shader which is "coupled" to location 0
which is pixel 0...
The vertex shader should have access to the texture map of the previous
pass.
Thus the vertex 0 in the shader could use a texture lookup to read pixel
0... it would then also discover/read that pixel 0 wants to go to pixel 5.
So the vertex moves itself to location 5 and thus the vertex shader outputs
the updated position for the vertex.
I am not sure what will happen... I am not sure which pixel will be called
for the pixel shader...
If vertex 0 activates pixel 5 in the pixel shader... then pixel 5 will be
able to read the input data from the vertex... (the vertex would have
outputted the pixel0).
Thus pixel 5 can now read pixel 0 without pixel5 knowing that pixel0 wanted
to move there... if I wanted to know it would have to scan the entire
arrray... not so with this technique... because pixel0 knows that it wants
to move to pixel5... so pixel5 couldn't care less where the pixel came
from...
However if pixel5 wants to know then ofcourse that information can be given
by the vertex0 as well
So far the theory... I think it could work... so an experiment will follow
shortly...
But now I have to go eat nice warm dinner !
Bye,
Skybuck.