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

Core: WebGLRenderTarget extends RenderTarget #26468

Merged
merged 2 commits into from
Jul 25, 2023
Merged

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Jul 20, 2023

Description

Currently, RenderTarget of WebGPU is extended from WebGLRenderTarget which doesn't seem very logical, this update renames WebGLRenderTarget to RenderTarget and create a new WebGLRenderTarget extended from RenderTarget for backwards compatibility.

/cc @mrdoob @Mugen87 @LeviPesin

@github-actions
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
645.2 kB (159.9 kB) 645.3 kB (159.9 kB) +102 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
438.3 kB (106 kB) 438.4 kB (106 kB) +83 B

@sunag sunag marked this pull request as ready for review July 20, 2023 05:34
@sunag
Copy link
Collaborator Author

sunag commented Jul 25, 2023

What do you think?

RenderTarget looks like with abstraction like CubeCamera and Texture does, I think this update might make hierarchy clearer in the future, mainly for WebGPURenderer.

@Mugen87
Copy link
Collaborator

Mugen87 commented Jul 25, 2023

I agree it does make sense to make this change. We have to consider WebGL and WebGPU when we design classes now and WebGLRenderTarget as a base class is confusing in context of WebGPU. A more generic RenderTarget class solves this issue.

@mrdoob
Copy link
Owner

mrdoob commented Jul 25, 2023

Sounds good to me 👌

@mrdoob mrdoob added this to the r155 milestone Jul 25, 2023
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.

3 participants