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

Use cube map for point light shadows #3718

Merged
merged 2 commits into from
Mar 17, 2016
Merged

Conversation

lilleyse
Copy link
Contributor

For #2594 and merging into #3711

I experimented with using a cube map instead a 2d texture. Sometimes I see a 5-10 fps increase, and sometimes it's equal. The organization is roughly the same.

The point light shadows work in both cases, so either we can keep both code paths in or chose one.

@@ -308,6 +308,11 @@ define([
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
};

Framebuffer.prototype._attachTexture = function(context, attachment, texture) {
context.bindFramebuffer(this);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It would be cleaner just to call _bind here, but then you end up re-binding the FBO when you render the shadow casters.

@pjcozzi
Copy link
Contributor

pjcozzi commented Mar 17, 2016

All looks good. I'm going to merge since the number of shadow branches is starting to get unwieldy. @bagnell feel free to review here or as part of #3711.

pjcozzi added a commit that referenced this pull request Mar 17, 2016
@pjcozzi pjcozzi merged commit 9310f79 into shadows-point-light Mar 17, 2016
@pjcozzi pjcozzi deleted the shadows-point-light2 branch March 17, 2016 18:27
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