Skip to content

Fix mesh invisible when GPU Instancing and Vertex Deformation are both enabled - #184

Merged
sakumanaoki merged 1 commit into
mainfrom
bugfix/vertex_deformation
Apr 6, 2026
Merged

Fix mesh invisible when GPU Instancing and Vertex Deformation are both enabled#184
sakumanaoki merged 1 commit into
mainfrom
bugfix/vertex_deformation

Conversation

@sakumanaoki

Copy link
Copy Markdown
Contributor

Summary

  • GPU Instancing ON + Vertex Deformation ON の場合にメッシュが非表示になる不具合を修正
  • _VERTEX_DEFORMATION_ENABLEDshader_feature_local_vertex)が Varyings
    構造体レイアウトに影響し、頂点・フラグメント間で不一致が発生していた
  • DepthOnly/DepthNormals パスで Vertex Deformation が normalOS にアクセスできなくなる副作用も合わせて修正

原因

_VERTEX_DEFORMATION_ENABLEDshader_feature_local_vertex(頂点ステージ限定キーワード)だが、FRAGMENT_USE_NORMAL_WS(両ステー
ジ共通の構造体フラグ)の条件に含まれていた。

  • 頂点シェーダー: キーワード有効 → normalWS : TEXCOORD7 が Varyings に存在
  • フラグメントシェーダー: キーワード伝搬されない → normalWS が Varyings に不在
  • → 構造体レイアウト不一致 → メッシュが描画されない

関連PR

#171

挙動確認

DepthNormalPassで頂点変形が効くこと

SS 2026-04-06 10 26 00

確認したこと

  • win, macでテストが通ること
  • 頂点変形でDepthNormalが反映されること

@shigehiro-yoshiki-ab shigehiro-yoshiki-ab left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

コードベースですがみました!
対応ほぼ同じなので大丈夫だと思います!

@sakumanaoki
sakumanaoki marked this pull request as ready for review April 6, 2026 05:41
@sakumanaoki
sakumanaoki merged commit 267d6f1 into main Apr 6, 2026
1 check passed
@sakumanaoki
sakumanaoki deleted the bugfix/vertex_deformation branch April 6, 2026 06:03
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