Menu

#24 Fog rendering change in 0.93.0

None
closed-fixed
nobody
None
5
2017-12-24
2017-12-20
No

0.93.0 switched to GLSL for drawing fog on world surfaces.
The shader does part of the calculation per-vertex. In certain situations (probably only visible in custom maps?), this looks different than fixed-function fog, it turns out. attached test case.

Thanks to ItEndsWithTens for noticing this and giving me a test case, which I made this reduced one from.

4 Attachments

Discussion

  • Eric Wasylishen

    Eric Wasylishen - 2017-12-20

    r1544 fixes this, rendering now match 0.91.0 (these screenshots are on macOS 10.13.2 / nvidia 650 gt for reference)

     
  • Eric Wasylishen

    Eric Wasylishen - 2017-12-20
    • status: open --> closed-fixed
     
  • Axel Gneiting

    Axel Gneiting - 2017-12-22

    Eric, I don't know if you care that much about perf, but you don't have to do the matrix multiplication in the fragment shader for this to work. In fact, you don't even need gl_ModelViewMatrix.

    Just interpolate gl_Position.w and then do the rest in fragment. It gives identical results (I checked). Shaders are here:
    https://github.com/Novum/vkQuake/blob/master/Shaders/world.frag
    https://github.com/Novum/vkQuake/blob/master/Shaders/world.vert

    This is also what fixed function GL is doing.

    Happy holidays.

     

    Last edit: Axel Gneiting 2017-12-22
  • Axel Gneiting

    Axel Gneiting - 2017-12-22

    Here is the quakespasm view from that cam

     
  • Eric Wasylishen

    Eric Wasylishen - 2017-12-24

    Thanks for the pointer! Applied it in https://sourceforge.net/p/quakespasm/code/1546/

    Happy holidays as well.

     

Log in to post a comment.

MongoDB Logo MongoDB