Skip to content

Fix: Apply Vertex Deformation in Depth Passes#169

Merged
CA-Tatami merged 1 commit into
mainfrom
fix/vertex-deformation-depth-pass
Oct 29, 2025
Merged

Fix: Apply Vertex Deformation in Depth Passes#169
CA-Tatami merged 1 commit into
mainfrom
fix/vertex-deformation-depth-pass

Conversation

@CA-Tatami
Copy link
Copy Markdown
Contributor

@CA-Tatami CA-Tatami commented Oct 29, 2025

DepthNormals/DepthOnlyパスにおいて、Vertex Deformationが適用されていなかった問題を修正しました。

問題点

Vertex Deformation機能は以下のパスで実装されていました:

  • ✅ Forward Pass(ParticlesUberUnlit.hlsl
  • ✅ ShadowCaster Pass(ParticlesUberShadowCaster.hlsl

しかし、DepthNormals/DepthOnlyパス(ParticlesUberDepthNormalsCore.hlsl)では実装されていませんでした。

シェーダーファイルでは _VERTEX_DEFORMATION_ENABLED キーワードが宣言されているものの、実際のVertex
Deformationコードが欠落していました。

影響範囲

この問題により、以下の視覚的な不具合が発生する可能性がありました:

  • Screen Space Ambient Occlusion(SSAO)の不正確な描画
  • Depth-based effects(フォグ、Depth Fade、Soft Particlesなど)でのアーティファクト
  • Deferred Renderingにおける法線ベースのライティングの不整合
  • アウトラインエフェクト(深度/法線を使用)の位置ずれ

修正内容

ParticlesUberDepthNormalsCore.hlslvert() 関数において、InitializeVertexOutputDrawDepth()
呼び出しの前にVertex Deformationコードを追加しました。

DepthNormals/DepthOnlyパスでVertex Deformationが
適用されていなかった問題を修正。
Forward/ShadowCasterパスと同じ実装を追加。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@CA-Tatami CA-Tatami changed the title DepthパスにVertex Deformationを追加 Fix: Apply Vertex Deformation in Depth Passes Oct 29, 2025
@CA-Tatami CA-Tatami requested a review from Copilot October 29, 2025 05:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a missing implementation of vertex deformation in the DepthNormals/DepthOnly shader passes. While vertex deformation was already implemented in Forward and ShadowCaster passes, it was missing from the depth passes despite the _VERTEX_DEFORMATION_ENABLED keyword being declared.

  • Added vertex deformation logic to the vert() function in the depth normals shader core
  • Ensures consistent vertex positions across all rendering passes
  • Prevents visual artifacts in depth-based effects like SSAO, fog, and soft particles

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@CA-Tatami CA-Tatami merged commit 0b70b5c into main Oct 29, 2025
1 check passed
@CA-Tatami CA-Tatami deleted the fix/vertex-deformation-depth-pass branch October 29, 2025 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants