Search Unity

Any way to detect when Y & poly winding order flips due to MSAA?

Discussion in 'Shaders' started by Ylisar, Nov 9, 2018.

  1. Ylisar

    Ylisar

    Joined:
    Jan 27, 2014
    Posts:
    19
    One undocumented(?) side effect of changing QualitySettings.antiAliasing to something larger than 0 is that Y in screen space & poly winding order flips in some cases. I presume this is then accounted for in the projection matrix making it transparent for the user for all transformations save for screen space. From my tests it's easy to see that it happens on at least DX11 on windows, but it doesn't seem to be the case on for example Android builds. What is the recommended way to account for this change?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    I believe _ProjectionParams.x is -1 when it’s flipped.