Skip to content

Added cascaded shadow maps suppot for directional lights.#988

Merged
robertosfield merged 123 commits into
masterfrom
Shadows
Oct 5, 2023
Merged

Added cascaded shadow maps suppot for directional lights.#988
robertosfield merged 123 commits into
masterfrom
Shadows

Conversation

@robertosfield
Copy link
Copy Markdown
Collaborator

No description provided.

…ht specific support into CollectResourceRequirements
…image layout that is usable in the fragment shader.
… of shadow maps, and moved to early in code block
Copy link
Copy Markdown
Contributor

@lufriem lufriem left a comment

Choose a reason for hiding this comment

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

I don't claim to really understand how shadows work but I noticed some trivial things, so did this unsolicited review. Very excited about that change!

double shadowMapBias = 0.005;
double lambda = 0.5;

// Shadow backend.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lower-case comment?


using namespace vsg;

CommandGraph::CommandGraph()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could this be simply left as =default; in the header?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It could, but it doesn't really gain anything. I like have even empty code blocks there so it's easy to add/remove debug output from the constructors.

Comment thread src/vsg/state/ViewDependentState.cpp Outdated

// This is the heart of what makes Vulkan offscreen rendering
// work: render passes that follow are blocked from using this
// passes' color attachment in their fragment shaders until all
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

typo?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

old hang up started with example as starting place for the render to texture, so have deleted this comment block.

Comment thread src/vsg/state/ViewDependentState.cpp Outdated
}

// use an image barrier to transition the initial shadow map array layout to VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
// so that whole shadow map is usable in fragment shader even when only portions of it have been set using a render to texture pass
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

so that THE whole shadow..

}
else
{
warn("RecordTraversal::apply(const CommandGraph& commandGraph) cannot traverse as commandGraph->device = ", cg->device);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

cg->device would be always be nullptr here, so maybe simplify that warning by getting rid of the (always-nullptr) parameter and write that directly into the text string?

@robertosfield robertosfield merged commit 5b203d3 into master Oct 5, 2023
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.

2 participants