Help with shader code

Kapila De Silva mail at
Mon Sep 11 16:43:48 CDT 2006

Hi All,

can someone help me understand some code from
dlls/wined3d/vertexshader.c please?

Im new to shader code, but to me the following looks a bit strange:

        shader_addline(&buffer, "ADD result.position.x, TMP_OUT.x,
        shader_addline(&buffer, "ADD result.position.y, TMP_OUT.y,
        /* Account for any inverted textures (render to texture case) by
reversing the y coordinate
         *  (this is handled in drawPrim() when it sets the MODELVIEW
and PROJECTION matrices)
        shader_addline(&buffer, "MUL result.position.y, TMP_OUT.y,

Am I correct that the last line makes the second line redundant? Wont
result.position.y be equal to TMP_OUT.y * PROJECTIONY.y no matter what?

Thanks in advance.


More information about the wine-devel mailing list