#18 Smooth Static Shadows in GL_Nearest

Next_Release
closed
nobody
opengl (5)
5
2011-05-08
2011-05-04
Enness
No

Okay, this is possibly a complicated idea. Essentially, I prefer to play most games without any filtering options - Low-res textures, when filtered, start to look blurry and this makes my eyes protest. I've been playing Hexen II with GL_Linear however, because the blocky shadows manage to bother me more than a bit of filtering does.

The request is to have a "smooth static shadows" option, so that map shadows are effectively filtered while textures remain unfiltered. I suspect this is possible, as I have noted that hitting shadowed areas with Lightbringer will display a smooth lit-up circle, even in GL_Nearest mode. Judging by the way static shadows are layered onto textures, I hope that this would be a possibility.

Discussion

  • Ozkan Sezer

    Ozkan Sezer - 2011-05-07

    It is amazing to find a player who enables the shadows.. And from time to time I think about removing the shadows functionality altogether because it is very much hacky and ugly, but oh well..
    I will look into this as time permits. In the meantime, if you really are playing with shadows enabled, make sure to enable stencil shadows too (use the menu entry, or use the cvar "gl_stencilshadow").

     
  • Enness

    Enness - 2011-05-07

    Static Shadows with GL_Linear

     
  • Enness

    Enness - 2011-05-07

    Oh, but I don't like the dynamic shadows much either. :P

    For clarity, here's the screens (which I should've attached first, oops) of the same scene in the two filtering modes. See how the blockiness of the shadows get very noticable? While textures are a bit blocky too, they are so on a much smaller scale.

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-05-07

    Ah, I see, I clearly misunderstood. I should have noticed the 'static' in your sentences.

    In current code, texture filetrs are applied almost to all, but I can unconditionally set lightmaps' filter to GL_LINEAR. Would that be better?

     
  • Enness

    Enness - 2011-05-07

    That could work too, yes.

    Though I'm not sure if any players out there prefer Nearest shadows, either for appearance or performance, and would complain. Would it be largely impractical to have a toggled setting?

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-05-07

    Not sure whether adding a new setting is really worth.

    OK, I will look into this.

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-05-07

    test patch for lightmaps to always use GL_LINEAR

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-05-07

    test build for win64 (x64)

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-05-07

    test build for win32 (x86)

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-05-07

    OK, see the attached test builds as well as the source patch. I tested myself but my testing is limited.

    Please test this and make sure that it functions expectedly under all circumstances, including after video mode changes, etc. If you give the OK, I will apply it to upstream source.

     
  • Enness

    Enness - 2011-05-08

    Beautiful! Changed video modes, between fullscreen and windowed, 16 and 32 BPP, and the filtered lightmaps remained intact. Very pleased with the results, thank you.

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-05-08
    • milestone: --> Next_Release
    • status: open --> closed
     
  • Ozkan Sezer

    Ozkan Sezer - 2011-05-08

    Thanks for testing! The changes are in the svn repository and will be integrated in the next formal release.

    Closing this tracker item.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks