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

HDR physically based bloom + render pass examples #5833

Merged
merged 1 commit into from
Nov 20, 2023
Merged

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Nov 20, 2023

Fixes: #5187
Related Issue: #5687

New Engine API (private for now, while in preview)

  • CameraComponent.renderPasses - an array of render passes the camera will use to render, instead of its default rendering.
  • RenderPassShaderQuad - new render pass, a base class for render passes that render quad using a shader.

Extras

Multiple render passes in /extras, used to implement HDR Bloom:

  • RenderPassUpscale/Downscale - quad based passes, used to upscale and downscale the image
  • RenderPassBloom - render pass using upscaling and downscaling to generate bloom texture
  • RenderPassComposite - a render pass compositing the scene texture with bloom texture. This will be expanded by multiple post-effects as part of the same shader / render pass: color-corrections, distortion, screen-texture and many others.

Examples

Two examples:

  • RenderPassExample: simple example showing a custom render pass (tint) and how to use it to tint the rendered scene
    Screenshot 2023-11-20 at 16 05 25

  • PostprocessingExample: example using new render passes from /extras to set up a scene with HDR bloom. Control over render passes allows user to render 3d scene to lower resolution HDR texture, apply bloom and then render UI on top of it in full resolution.
    Screenshot 2023-11-20 at 16 04 52

@mvaligursky mvaligursky merged commit 2a61302 into main Nov 20, 2023
7 checks passed
@mvaligursky mvaligursky deleted the mv-hdr-bloom branch November 20, 2023 16:55
@MAG-AdrianMeredith
Copy link
Contributor

Very nice, render pass implementation over post effects looks nice. Look forward to comparing it to ours.

@mvaligursky
Copy link
Contributor Author

Yep, the render passes are a really nice way to put this together.
If you at some point write another bloom implementation using passes, we can easily add that to extras too, no problem with that.

@MAG-AdrianMeredith
Copy link
Contributor

@mvaligursky Have you tried this with a directional light present? I'm getting errors here
image
the shadowCamera.renderTarget is undefined. it works otherwise and could just be me but its worth checking

@MAG-AdrianMeredith
Copy link
Contributor

image

@MAG-AdrianMeredith
Copy link
Contributor

Can repo on the offical example so logged a bug #5844

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create modern looking bloom post-effect
3 participants