PDA

View Full Version : Extended Swizzle in ARB_v_p



Asgard
09-20-2002, 12:30 PM
Hi,
I've encountered something I don't understand with the extended SWZ instruction of ARB_v_p.
If I do this


SWZ result.color, vertex.color.primary, -1, 0, 0, 0;
on my GF4 with 40.41 drivers, and render a triangle with the colors (1, 0, 0), (0, 1, 0) and (0, 0, 1) for each vertex, I get a triangle that is red at each vertex, except for the vertex with color (1, 0, 0) which is black. I thought I'd get a black triangle (because the -1 will get clamped to 0). Is there something I don't understand about SWZ or color clamping, or is it a driver bug?
Thanks.

pbrown
09-20-2002, 08:02 PM
Originally posted by Asgard:
Hi,
I've encountered something I don't understand with the extended SWZ instruction of ARB_v_p.
If I do this


SWZ result.color, vertex.color.primary, -1, 0, 0, 0;
on my GF4 with 40.41 drivers, and render a triangle with the colors (1, 0, 0), (0, 1, 0) and (0, 0, 1) for each vertex, I get a triangle that is red at each vertex, except for the vertex with color (1, 0, 0) which is black. I thought I'd get a black triangle (because the -1 will get clamped to 0). Is there something I don't understand about SWZ or color clamping, or is it a driver bug?
Thanks.

It's a driver bug. Hopefully, the fix will get into the next public release of the Detonator 40 drivers.