課題提出:陽炎(HeatDistortion)のポストエフェクトを追加 - #7
Open
5unad0ke1 wants to merge 7 commits into
Open
Conversation
Volume / RenderPass / Shader の3層と SiriusPostProcessingFeature への AllowFlag 配線を既存3エフェクトと同型で実装する。 - 深度から求めたカメラ距離を StartDistance〜FadeDistance で減衰カーブに 変換し、遠景ほど強く歪ませる - 3Dノイズ(Texture2DArray, 64スライス)の隣接2スライスを時間で lerp して 揺らぎパターンを生成し、スクリーンUVをオフセットする - R/G/B それぞれ独立したノイズスライスをサンプルして色収差を作る。 ChromaticSeparation = 0 で3チャンネルが同一スライスに収束し色ずれが消える - 非正方形画面でも歪みが円形に見えるようアスペクト比補正を入れる - IsActive() は Blend / Intensity / FadeDistance で判定し、無効時は RecordRenderGraph を早期 return してゼロコストにする - _intensity の既定値は既存 Volume の _strength と揃えて 0.0f とし、 Volume の Weight が 0 のとき(既定値へ補間される場合)も無効化されるようにする - NoiseTexture 未設定時は SetTexture を呼ばない。次元の異なる Texture2D.whiteTexture をフォールバックに使えないため Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
パス一覧へ HeatDistortionRenderPass を追加し、深度テクスチャ依存・ ノイズテクスチャの次元(Texture2DArray)・null 許容・既定値0でのゼロコスト 無効化といった、このパス固有の注意点を記載する。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- URP Renderer の SiriusPostProcessingFeature で allowHeatDistortionPostProcess を有効化する - Workshop_HeatDistortion の Global Volume Profile へ HeatDistortionVolume を追加し、NoiseTexture にプリセットの 3DCells64Sheet を割り当てる - 3DCells64Sheet は Texture3D としてインポートされていたため、 シェーダー側の TEXTURE2D_ARRAY 宣言に合わせて Texture Shape を 2D Array へ変更する(Unity Editor が再生成した .meta) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Phase 1 の Intent と Phase 2 の Plan。Construction および Phase 3 の品質 チェックで判明した設計変更・誤りを plan.md に反映済み。 - ノイズ座標をワールド座標からスクリーン座標へ変更 - エッジガードの不採用 - 色収差をチャンネル独立のノイズサンプリングへ変更 - _intensity 既定値を 0.0f 化 - UoW#5(答えドキュメント)の撤回。docs/workshop/answers/ はワーク①〜③の 答え合わせ用であり、仕込みバグのないワーク④には正解コードが存在しない Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
視線の上下方向成分で歪みを減衰させる角度マスク(水平線/天頂)を廃止する。 デモの Global Volume Profile では ZenithMask / HorizonMask / HorizonExponent のいずれも override off のまま運用されており、調整対象になっていなかった。 - HeatDistortionVolume から ZenithMask / HorizonMask / HorizonExponent を フィールド・公開プロパティごと削除する - HeatDistortionRenderPass の対応する SetFloat と ShaderPropertyIDs を削除する - シェーダーの Properties / uniform 宣言、angleMask の算出と strength への 乗算を削除する - angleMask 専用だった viewDir / verticalDot も未使用になるため削除する。 GetCameraDistance は引き続き使うため ScreenSpaceUtil.hlsl の include は残す HorizonExponent は角度マスクの減衰カーブ専用パラメータであり、マスク廃止で 参照元が無くなったため併せて削除した。これにより遠景の歪みは視線方向に よらず一様にかかるようになる。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
色収差のチャンネル別サンプリング3行だけが half1 を使っており、同じ関数内の half / half2 / half3 / half4 や SiriusPackages 全体の記法と揃っていなかった。 half1 は vector<half,1> であり、スカラーの half とは暗黙変換がコストなしで 効き生成コードも同一のため、この変更に挙動の差はない。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fab174eed0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ご確認いただけたら幸いです。
概要
HeatDistortionVolumeの Intensity 既定値は 0.0f で、SiriusPostProcessingFeatureのallowHeatDistortionPostProcessと Volume 側の Intensity / Blend を上げて初めて効果が出る3DCells64Sheet.png.metaの Texture Shape を Texture3D → 2D Array へ変更した。シェーダー側のTEXTURE2D_ARRAY宣言に合わせるため必須(Unity Editor が再生成)設計意図
IsActive()を Blend / Intensity / FadeDistance で判定し、無効時はRecordRenderGraphを早期 return してゼロコストにする。詳細は plan.md 参照テスト
Workshop_HeatDistortionシーンを再生し、陽炎の挙動を目視確認済みAverageTest.csのテストケースに含めていない)。比較元画像を持たないため、テストケース化するとautoApproveMissingReferencesにより未検証の描画結果がそのまま正解として記録されてしまう関連