I'm back. Been too busy to work in this for a while.
And I'll be looking at it again later tonight.

In the mean-time, its a bit off-topic, but can someone
help me out with a basic shader question...

Look at the following vertex shader. It contains some
INVALID shader code regarding max_x, min_x, max_y and min_y.
Is there a way to do this style of 'changing' values of 'global'
variables? Just within ONE pass of this shader.

Code:
float min_x=0, max_x=0, min_y=0, max_y=0;

void VS( in  float4 InPos, ... )
{
    if(InPos.x<min_x)   min_x=InPos.x;  
    if(InPos.x>max_x)   max_x=InPos.x;  

    if(InPos.z<min_y)   min_y=InPos.z;  
    if(InPos.z>max_y)   max_y=InPos.z;  

    ....


Im trying to capture the maximum 'width' and 'length' values in object-space.
The vertex-shader wont be 'using' this data, but I want the pixel-shader to be able to.

So a second question, and an important one... Does the vertex shader process
ALL of the vertices of the object BEFORE the pixel-shader even gets started?




"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial