Skip to content

Fixed feature set override in shadow, outline, and picking passes#523

Merged
adriengivry merged 3 commits intomainfrom
fix/feature_set_override
May 16, 2025
Merged

Fixed feature set override in shadow, outline, and picking passes#523
adriengivry merged 3 commits intomainfrom
fix/feature_set_override

Conversation

@adriengivry
Copy link
Member

@adriengivry adriengivry commented May 16, 2025

Description

Instead of completely overriding the current feature set of a material when rendering a special pass (shadow, outline, picking), this PR ensures the material feature set is preserved, and the feature associated with the pass is added on top.
This way, effects bound to features (e.g. parallax), can still be used during special passes (e.g. shadows).

The engine UBO has been updated to support on-the-fly view/camera changes, this way, the shadow pass can override the view info by providing the light data (will be necessary for reflection probes too).

To-Do

  • The engine UBO isn't updated to use the light's pos as the view pos, which breaks shader code relying on ubo_ViewPos.

Related Issue(s)

N/A

Review Guidance

Write here.

Screenshots/GIFs

Write here.

@adriengivry adriengivry self-assigned this May 16, 2025
@adriengivry adriengivry added the Graphics Graphical feature label May 16, 2025
…ew and proj)

* Cleaned up shadow rendering code
* Updated Engine UBO code to support overriding the view
@adriengivry adriengivry marked this pull request as ready for review May 16, 2025 15:36
@adriengivry adriengivry merged commit 42cee47 into main May 16, 2025
1 check passed
@adriengivry adriengivry deleted the fix/feature_set_override branch May 16, 2025 15:37
@adriengivry adriengivry changed the title [WIP] Fixed feature set override in shadow, outline, and picking passes Fixed feature set override in shadow, outline, and picking passes May 16, 2025
adriengivry added a commit that referenced this pull request May 16, 2025
* Fixed feature set override in shadow, outline, and picking passes
* Removed _LightSpaceMatrix for shadow casting, using ubo instead (view and proj)
* Cleaned up shadow rendering code
* Updated Engine UBO code to support overriding the view
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Graphics Graphical feature

Development

Successfully merging this pull request may close these issues.

1 participant