That does look wrong. The proper code should probably look like this: shader_addline(&buffer, "ADD result.position.x, TMP_OUT.x, PROJECTIONX.w;\n"); shader_addline(&buffer, "MAD result.position.y, TMP_OUT.y, PROJECTIONY.y, PROJECTIONY.w;\n");