Jump to content
The Dark Mod Forums

Water effects not rendered through warp glass


Recommended Posts

8 minutes ago, stgatilov said:

If they have same material and "sort" value, then they are eventually sorted by surface index. This order is constant in one playthrough, but can change even if you restart the game.

And if you have two postprocessing surfaces on the same place, then both of them will be visible if they render in correct order. If the closest surface renders first, then the farthest surface won't be visible.

I see. so if we are "lucky" the glass renders first then the torch haze second but we seem to be consistently unlucky in some scenarios so the reverse order is happening...

I am hesitant to suggest it, but what about forcing all alpha blends and transparencies to use the painter algorithm (with a depth buffer check for opaque objects)?

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

1 hour ago, nbohr1more said:

I am hesitant to suggest it, but what about forcing all alpha blends and transparencies to use the painter algorithm (with a depth buffer check for opaque objects)?

If you suggest something like depth buffer, then you'll eventually get at the technique called "depth peeling".

It works by rendering all translucent surfaces over and over again, rendering exactly one layer of translucent surfaces one every phase, until all layers are rendered and nothing changes.
This is quite expensive, although the true cost depends on maximum degree of overlapping.


If you suggest something like sorting surfaces from back to front on CPU, then you get a well-known unsolvable problem. The worst thing here is that when surfaces' boxes intersect, their order toggles back and forth as you run around them.

In order to perfectly solve depth sorting in general case, you have to split surfaces. For static geometry, BSP tree is the best way to do it: that's how e.g. Doom worked without depth buffer. But adding dynamic surfaces into BSP tree is still an issue.

Link to comment
Share on other sites

6 minutes ago, AluminumHaste said:

Yes, that's exactly what I'm talking about regarding BSP tree.
World brush geometry can be put into its own BSP tree by dmap, which can be rendered in perfect back-to-front order.

UPDATE: But, even static geometry will cause problem with postprocessing surfaces. Because you have to copy renderbuffer befor every postprocessing surface rendered in order to get proper picture, and that's very expensive.

With depth peeling, you need to copy renderbuffer after every layer, if there is a chance that next layer will include postprocessing shader.

  • Like 1
Link to comment
Share on other sites

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

5 minutes ago, nbohr1more said:

Interesting, the original demo runs at 14,000fps on my computer. I can't imagine how much faster his optimized version runs at.

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

By the way, revisions 9966 + 9967 broke test/glass map pretty bad.

It has a glass wall near starting location, which consists of 8 glass windows of different material.
Previously, it looked nice from all directions.
But now when you look them from behind, they toggle on and off as you walk around.

Link to comment
Share on other sites

On 7/9/2022 at 1:05 PM, AluminumHaste said:

As far as I know you should only use twosided shaders on patches, as the back side of the patch is not rendered. Brushes should use onesided shaders.

Yes thanks for that.  I didn't realize the glass materials were 2-sided.  I've changed the windows in my WIP FM to patches instead now.

In the test map, 3 of the windows are brushes, but the last one (on the far right) is a patch.

Edited by Frost_Salamander
Link to comment
Share on other sites

  • 2 weeks later...

I disabled the feature in svn rev 10033, although it can be enabled back with r_testPostprocessMultiple.

The problem is that any window with two-sided warping material previously worked fine, but now will flicker (like test/glass). Also, it seems that the original problem is not going to be solved anyway due to depth sorting problem... better have a feature with clear limitation (one layer copy) than have a randomly broken feature...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...