Skip to content

[#245] Light Components Depth Mapping Resources#249

Open
ziadzananiri wants to merge 4 commits into
mainfrom
245-dmap-light
Open

[#245] Light Components Depth Mapping Resources#249
ziadzananiri wants to merge 4 commits into
mainfrom
245-dmap-light

Conversation

@ziadzananiri
Copy link
Copy Markdown
Collaborator

  • DirectionalLightComponent, PointLightComponent, and SpotLightComponent now have a DescriptorSetLayout attribute for descriptor sets. (code is very redundant ik)
  • Added depthImage, depthImageMemory, depthImageView, depthSampler, and depthDescriptorSet as members to DirectionalLightComponent, PointLightComponent, and SpotLightComponent.
  • DirectionalLightComponent, PointLightComponent, and SpotLightComponent now also have new methods: initDescriptorSetLayout(), getDescriptorSetLayout(), cleanup(), and initDepthMappingResources() for managing their descriptor set states.
  • Created a new method uploadLightGPUResources() in SauceEngineApp. This method iterates through all the entities in the scene that have any of the light components and calls their initDepthMappingResources() method.

…ted a function in the SauceEngineApp to initialize current light component descriptor sets
@ziadzananiri ziadzananiri self-assigned this Mar 23, 2026
@ziadzananiri ziadzananiri added enhancement New feature or request help wanted Extra attention is needed rendering Displaying stuff to screen labels Mar 23, 2026
@ziadzananiri ziadzananiri linked an issue Mar 23, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator

@EthanVinceBudan EthanVinceBudan left a comment

Choose a reason for hiding this comment

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

Unfortunately there's no way to test this at the moment but it seems mostly ok👍Other than one small note, I did see a validation error on shutdown (pretty sure the descriptor set layout doesn't get cleaned up). As you pointed out, there's definitely some repetition in the DescriptorSetLayout code; I would recommend refactoring into LightComponent so you only have to worry about init & cleanup once instead of once per light type. Should help fix that error too.

Comment thread include/app/components/DirectionalLightComponent.hpp Outdated
…ightComponent.cpp, updated all the previous light components, CMakeLists, and SauceEngineApp light logic
Copy link
Copy Markdown
Collaborator

@EthanVinceBudan EthanVinceBudan left a comment

Choose a reason for hiding this comment

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

Looks great!

@rowel-eshan
Copy link
Copy Markdown
Collaborator

rowel-eshan commented Mar 31, 2026

Renders without a environment map but get "abort() called" when trying to render with an env map.
image
Also there is a weird bright circle on the floor that was not there before.

Edit: nvm that circle was always there. just never noticed it lol

@ziadzananiri ziadzananiri requested review from rowel-eshan and removed request for rowel-eshan April 2, 2026 20:24
@ziadzananiri
Copy link
Copy Markdown
Collaborator Author

branch was very behind from main, i pulled, plz check again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request help wanted Extra attention is needed rendering Displaying stuff to screen

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add depth mapping resources to light components

3 participants