OpenRA / OpenRA/OpenRA

Track palette opacity through the renderer

Open
#14,415 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Performance Refactor Tiberian Sun
Dominant language
C#
Stars
17.4k
Forks
3k
Avg merge
1d 12h
Merged PRs (30d)
14

Description

The depth buffer allows us to render fully opaque objects in any order without changing the final result (ignoring z-fighting). The next step of the renderer depth-buffer rewrite is to take advantage of this fact to reorder rendering by type (to reduce batch breakage) instead of by screen position.

  1. Add an Opaque (or maybe Translucent) flag to the IPalette interface
  2. Add an Opaque (or maybe Translucent) flag to the IRenderable interface, which in most implementations will return the value from the renderable's palette.
  3. Adjust the TS mod rules to provide opaque (with legacy shadow-index remapping disabled) and non-opaque versions of palettes as needed.

Most (but IIRC not all) TS artwork splits shadows into their own frames, so most of the main artwork can use opaque palettes. The stealth effect currently works by swapping palettes, so we do not need to do any additional work to support that.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the IPalette and IRenderable interfaces, their implementations, and the TS mod rules. Trace how palettes and renderables are passed through the renderer, then verify that opaque and non-opaque variants support the intended ordering and shadow-index behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
computer-graphics, game-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.