Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cascaded shadow maps #1338

Merged
merged 8 commits into from
Oct 9, 2024
Merged

Conversation

tomas7770
Copy link
Contributor

@tomas7770 tomas7770 commented Sep 30, 2024

Description

Adds cascaded shadow maps, to allow for directional lights to cast shadows.

Checklist

  • Self-review changes.
  • Evaluate impact on the documentation.
  • Ensure test coverage.
  • Write new samples.
  • Add entry to the changelog's unreleased section.

@tomas7770 tomas7770 linked an issue Sep 30, 2024 that may be closed by this pull request
Copy link
Contributor

github-actions bot commented Sep 30, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://GameDevTecnico.github.io/cubos/preview/pr-1338/
on branch gh-pages at 2024-10-08 22:02 UTC

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Clang-Tidy found issue(s) with the introduced code (1/2)

engine/src/render/cascaded_shadow_maps/plugin.cpp Outdated Show resolved Hide resolved
engine/src/render/cascaded_shadow_maps/plugin.cpp Outdated Show resolved Hide resolved
engine/src/render/shadows/directional_caster.cpp Outdated Show resolved Hide resolved
engine/src/render/deferred_shading/plugin.cpp Outdated Show resolved Hide resolved
engine/src/render/deferred_shading/plugin.cpp Outdated Show resolved Hide resolved
engine/src/render/deferred_shading/plugin.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Clang-Tidy found issue(s) with the introduced code (2/2)

engine/src/render/deferred_shading/plugin.cpp Outdated Show resolved Hide resolved
engine/src/render/deferred_shading/plugin.cpp Outdated Show resolved Hide resolved
engine/src/render/deferred_shading/plugin.cpp Outdated Show resolved Hide resolved
engine/src/render/deferred_shading/plugin.cpp Outdated Show resolved Hide resolved
engine/src/render/deferred_shading/plugin.cpp Outdated Show resolved Hide resolved
engine/src/render/deferred_shading/plugin.cpp Outdated Show resolved Hide resolved
@tomas7770 tomas7770 force-pushed the 1187-add-cascaded-shadow-maps-plugin branch from 1923564 to fd4adb1 Compare September 30, 2024 23:02
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

engine/src/render/deferred_shading/plugin.cpp Outdated Show resolved Hide resolved
Copy link

codecov bot commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 0% with 262 lines in your changes missing coverage. Please review.

Project coverage is 40.40%. Comparing base (0128120) to head (190159f).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
.../render/cascaded_shadow_maps_rasterizer/plugin.cpp 0.00% 116 Missing ⚠️
engine/src/render/deferred_shading/plugin.cpp 0.00% 65 Missing ⚠️
engine/src/render/shadows/directional_caster.cpp 0.00% 30 Missing ⚠️
engine/src/render/cascaded_shadow_maps/plugin.cpp 0.00% 26 Missing ⚠️
core/src/geom/utils.cpp 0.00% 14 Missing ⚠️
core/src/gl/ogl_render_device.cpp 0.00% 5 Missing ⚠️
engine/src/render/camera/camera.cpp 0.00% 2 Missing ⚠️
engine/src/render/defaults/plugin.cpp 0.00% 2 Missing ⚠️
engine/src/render/camera/plugin.cpp 0.00% 1 Missing ⚠️
engine/src/render/shader/plugin.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1338      +/-   ##
==========================================
- Coverage   40.73%   40.40%   -0.33%     
==========================================
  Files         430      432       +2     
  Lines       30500    30745     +245     
==========================================
  Hits        12424    12424              
- Misses      18076    18321     +245     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tomas7770 tomas7770 force-pushed the 1187-add-cascaded-shadow-maps-plugin branch 2 times, most recently from 5992420 to 52f8e80 Compare October 1, 2024 18:07
@tomas7770 tomas7770 marked this pull request as ready for review October 1, 2024 20:53
@tomas7770 tomas7770 requested review from RiscadoA and a team as code owners October 1, 2024 20:53
Copy link
Member

@RiscadoA RiscadoA left a comment

Choose a reason for hiding this comment

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

Thank you very much for working on this! 🎉 It got quite complex indeed, but I think you made a good job on making it as readable as possible 😌

Mostly pointed out areas of the code which could be slightly refactored to become a bit less complex. I still haven't been able to test this on my machine, but it would be nice if at least all of the reviewers assigned to this PR tried running it!

engine/assets/render/deferred_shading.fs Outdated Show resolved Hide resolved
engine/assets/render/deferred_shading.fs Outdated Show resolved Hide resolved
engine/assets/render/deferred_shading.fs Show resolved Hide resolved
engine/assets/render/deferred_shading.fs Outdated Show resolved Hide resolved
engine/src/render/deferred_shading/plugin.cpp Outdated Show resolved Hide resolved
engine/src/render/deferred_shading/plugin.cpp Outdated Show resolved Hide resolved
engine/src/render/deferred_shading/plugin.cpp Outdated Show resolved Hide resolved
engine/src/render/deferred_shading/plugin.cpp Outdated Show resolved Hide resolved
@RiscadoA RiscadoA added this to the 0.4 milestone Oct 2, 2024
Copy link

cubos-bot bot commented Oct 2, 2024

@mkuritsu will only be able to review this PR in 3 days.

Copy link
Member

@RiscadoA RiscadoA left a comment

Choose a reason for hiding this comment

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

Other than the comments still to be resolved, LGTM!

@tomas7770 tomas7770 force-pushed the 1187-add-cascaded-shadow-maps-plugin branch from 4bd089b to e573c96 Compare October 4, 2024 10:37
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

core/src/gl/ogl_render_device.cpp Outdated Show resolved Hide resolved
core/src/gl/ogl_render_device.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@mkuritsu mkuritsu left a comment

Choose a reason for hiding this comment

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

Apart from the change I mention LGTM!

core/src/gl/ogl_render_device.cpp Outdated Show resolved Hide resolved
@tomas7770 tomas7770 force-pushed the 1187-add-cascaded-shadow-maps-plugin branch 2 times, most recently from 9c9464b to aee5a20 Compare October 7, 2024 22:09
@tomas7770 tomas7770 force-pushed the 1187-add-cascaded-shadow-maps-plugin branch from aee5a20 to e4710fc Compare October 7, 2024 22:38
@tomas7770 tomas7770 force-pushed the 1187-add-cascaded-shadow-maps-plugin branch from e4710fc to 4c783c2 Compare October 8, 2024 22:01
@tomas7770 tomas7770 force-pushed the 1187-add-cascaded-shadow-maps-plugin branch from 4c783c2 to 190159f Compare October 9, 2024 10:45
@tomas7770 tomas7770 merged commit 2ac8c9d into main Oct 9, 2024
11 checks passed
@tomas7770 tomas7770 deleted the 1187-add-cascaded-shadow-maps-plugin branch October 9, 2024 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add cascaded shadow maps plugin
4 participants