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

WebGL2 MSAA RTs and RenderTarget refactor #877

Merged
merged 7 commits into from Mar 8, 2017

Conversation

guycalledfrank
Copy link
Contributor

@guycalledfrank guycalledfrank commented Mar 8, 2017

New API:

  • pc.RenderTarget constructor is changed and now just:
    new pc.RenderTarget(options)
    Device is not needed anymore, colorBuffer is an option. The constructor is backwards compatible though.
  • New options (WebGL2):
    -- options.samples (int): defines the number of MSAA samples.
    -- options.autoResolve (bool): automatically resolve MSAA after rendering (the default is true).
    -- options.depthBuffer (pc.Texture): same as colorBuffer, but for depth - put your own texture. Must have PIXELFORMAT_DEPTH or PIXELFORMAT_DEPTHSTENCIL format. Read it back later. Depth and stencil options are then ignored.
  • RenderTarget.resolve(color, depth): manually resolve MSAA RT when needed.

@Maksims Maksims merged commit 4e67616 into playcanvas:master Mar 8, 2017
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.

None yet

2 participants