Openra: Z-Buffer support

Created on 22 Feb 2015  路  6Comments  路  Source: OpenRA/OpenRA

Corpses being rendered above vehicles is looking glitchy and bugging me for quite some time. Somehow not easy to fix. The ZOffset is ignored. I tried adding it to sequences and hard-coded into the corpse effect.

Already fixed by https://github.com/OpenRA/OpenRA/issues/10119.

Feature

Most helpful comment

I now have a big chunk of this feature completed and ready for review/merge:

  • [x] #11058 puts in place the initial groundwork and adds depth buffer support for terrain.
  • [x] #11091 adds depth buffer support for regular sprites and fixes shroud rendering.
  • [x] #11098 prepares for per-sprite depth maps (for buildings).
  • [ ] [tileset-depth](https://github.com/pchote/OpenRA/tree/tileset-depth) makes some depth metadata configurable and sets up the correct offsets for TS.

depthbuffer-part-two is a bucket of prototype changes that will grow into more PRs after the earlier ones are merged.

All 6 comments

This applies to all Effects, which aren't z-sorted for performance reasons. This will eventually be fixed when we redo the renderer with proper z-buffer support (which is a prerequisite for proper TS support).

We merged #7968 in an earlier release and I have just filed #9476. The next step is to fix our treatment of the vertex z coordinates, and it then becomes easy to construct a depth image for the terrain:

screen shot 2015-09-28 at 21 15 02

Once we have the depth image, it then becomes straightforward (but not trivial to do properly - this is from a super-hacky prototype) to enable proper depth filtering:

screen shot 2015-09-28 at 22 09 27

Looks impressive! Is the missing door overlay a regression due to wrong Z sorting or is this just based on a version of the TS mod where those door overlays weren't added yet?

It is a regression due to wrong z sorting because of the quick and dirty way it was implemented. The proper implementation (which depends on some refactoring that hasn't happened yet) won't have that problem.

I now have a big chunk of this feature completed and ready for review/merge:

  • [x] #11058 puts in place the initial groundwork and adds depth buffer support for terrain.
  • [x] #11091 adds depth buffer support for regular sprites and fixes shroud rendering.
  • [x] #11098 prepares for per-sprite depth maps (for buildings).
  • [ ] [tileset-depth](https://github.com/pchote/OpenRA/tree/tileset-depth) makes some depth metadata configurable and sets up the correct offsets for TS.

depthbuffer-part-two is a bucket of prototype changes that will grow into more PRs after the earlier ones are merged.

Was this page helpful?
0 / 5 - 0 ratings