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

feat: Post Processing Improvements + Pre-multiplied alpha #2142

Merged
merged 8 commits into from
Dec 6, 2021

Conversation

eonarheim
Copy link
Member

@eonarheim eonarheim commented Dec 4, 2021

===:clipboard: PR Checklist :clipboard:===

  • 📌 issue exists in github for these changes
  • 🔬 existing tests still pass
  • 🙈 code conforms to the style guide
  • 📐 new tests written and passing / old tests updated with new scenario(s)
  • 📄 changelog entry added (or not needed)

==================

Related to v26 roadmap

This PR re-implements post processing using webgl fragment shaders, it is MUCH faster this way. The method of action for this PR uses framebuffers which are encapsulated by ex.RenderTarget which will capture all draw calls and redirect them to a framebuffer texture. This change also requires Excalibur support pre-multiplied alpha because all things end up pre-multiplied in the gpu.

Great articles on premultiplied

Changes:

  • New ex.RenderTarget and ex.RenderSource to encapsulate
  • New ex.ScreenRenderer which can draw a RenderSource to the entire screen
  • Breaking change to how post processing works, requires fragment shaders
  • Slight Breaking change to the ex.ColorBlindnessPostProcessor

@github-actions github-actions bot added the enhancement Label applied to enhancements or improvements to existing features label Dec 4, 2021
@eonarheim eonarheim merged commit fb7f720 into main Dec 6, 2021
@eonarheim eonarheim deleted the feature/post-processing-improvements branch December 6, 2021 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Label applied to enhancements or improvements to existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant