PS_DeferredTextured gbuffer layout (normals are packed kinda weird)

オープン
#1,891 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
活発
領域
desktop-dev

調査の方向性

The gbuffer targets are written by PS_DeferredTextured and the other deferred material shaders; the issue describes six render targets and their encodings (octahedral normal in mrt1, sqrt-encoded mrt2, id and flag bytes in mrt3, float motion in mrt4). Start by reading those shader files and the matching lighting shader that decodes them, then check the render target formats where they are bound. Done means the layout is documented accurately against the code and the format requirements are noted, and the issue is related to #603.

索引モデルが issue の本文から書いたものです。

説明

was poking at what PS_DeferredTextured actually writes (prob the other deferred material shaders too but i only checked that one) and figured id drop it here since the gbuffer is gonna matter once draws work. its 6 targets:

  • mrt0 rgb is albedo
  • mrt1 is the world normal but its NOT 3 channels of xyz, its a 24 bit octahedral word split across g b a (red holds something else). low 12 bits are u, high 12 are v, each q / 2047.5 - 1, then the usual octahedral fold
  • mrt2 looks sqrt encoded, the lighting shader squares it back (prob f0/spec stuff)
  • mrt3 z and w are byte ids, y has flags
  • mrt4 is motion and wants a float format, the rest want rgba8 unorm

the trap is if u bind f16 targets for everything the normal bytes come back mangled and lighting gets speckly, so the formats really matter here (same thing as in #603 kinda)

主要言語
Python
スター
14.9k
フォーク
1.2k
平均マージ
1時間 58分
マージ済み PR(30日)
40

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ItsNotRexed/Leonida のほかの issue

ItsNotRexed/Leonida の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。