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

[BREAKING] Remove support for Layer.renderTarget and some callbacks on the Layer #6888

Merged
merged 3 commits into from
Aug 21, 2024

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Aug 21, 2024

  • removed Layer.renderTarget support, which has been deprecated for few years now. renderTarget can be set on the CameraComponent only now.
  • this made multiple callbacks on the Layer no longer relevant, and those were removed as well:
    • onPreRender
    • onPreRenderOpaque
    • onPreRenderTransparent
    • onPostRender
    • onPostRenderOpaque
    • onPostRenderTransparent
  • two callbacks were moved from the Layer to a more appropriate place at the CameraComponent:
    • onPreCull
    • onPostCull
  • Layer.layerReference has been removed, this have been unused for some time
  • Layer.onDrawCall callback has been removed. This was a callback called during rendering when all render state has been setup, allowing the user to apply some overrides. With the move to render pipelines and uniform buffers, only a very limited subset of state could be change here, making it pointless. This will also further limited when we implement parallel render pipeline compilation, as even those few remining bits that can be changed currently will no longer be applicable.

Callbacks available now, all on the CameraComponent:

  • onPreCull
  • onPostCull
  • onPreRender
  • onPostRender

There will likely be additional callbacks added for the render pass architecture, but that a separate work in the future.

Copy link
Contributor

@willeastcott willeastcott left a comment

Choose a reason for hiding this comment

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

This is great - lovely to see this cleaned up. The future is bright!

mvaligursky and others added 2 commits August 21, 2024 14:12
Co-authored-by: Will Eastcott <will@playcanvas.com>
Co-authored-by: Will Eastcott <will@playcanvas.com>
@mvaligursky mvaligursky merged commit b15e751 into main Aug 21, 2024
7 of 8 checks passed
@mvaligursky mvaligursky deleted the mv-remove-layer-rt branch August 21, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants