My first pass code looks like:
XSI_RTS_ColorRGBA *color = in_pGeom->m_pColorPtrArray[0];
for(DWORD dwI = 0; dwI < in_pGeom->m_NbVertices; dwI++)
{
XSI_RTS_ColorRGBA a = *color;
color->m_alpha = 0;
color->m_blue = a.m_red;
color->m_green = a.m_green;
color->m_red = a.m_blue;
++color;
}
When applied to something simple like a cube it appears to work fine. When I
moved onto more complex meshes like a sphere it begins to go a bit wrong:
This is the view in shaded:
www.xiotex.com/shaded.JPG
and the same view in dx:
www.xiotex.com/dx.JPG
Any clues you can give me about what I am doing wrong...
>In XSI_RTS_TriangulatedGeometry's definition:
>XSI_RTS_ColorRGBA *m_pColorArray;
>
>So you have to swizzle that before you use it your shader. Since you're
>modifying the DXDraw node's code, then you can do the swizzle there or
>probably better at the graphics sequencer level.
>
>Also, the code for DXDraw and the DX graphics sequencer shows what states
>are overwritten by these nodes. Note that they use a state block to preserve
>original device state after EndScene().
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe 3dgames