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

(docs) Missing changelog/docs for r126 WebGLRenderTarget.setTexture #23466

Closed
nyan-left opened this issue Feb 11, 2022 · 4 comments · Fixed by #23498
Closed

(docs) Missing changelog/docs for r126 WebGLRenderTarget.setTexture #23466

nyan-left opened this issue Feb 11, 2022 · 4 comments · Fixed by #23498

Comments

@nyan-left
Copy link

nyan-left commented Feb 11, 2022

r126 introduced setTexture within WebGLRenderTarget. This is not documented in the release. Looks like there's no mention of it in the docs either.

The release notes + docs should be updated to reflect this addition.

Relevant commit here.

Happy to help out with the docs if needed. Thanks!

@Mugen87
Copy link
Collaborator

Mugen87 commented Feb 11, 2022

This method is only used at one place in the entire code base:

renderTarget.setTexture( renderTargetTexture );

Um, I wonder if we could remove the method and solve the use case in the example differently. Maybe just inlining the code of setTexture() in the example?

@Mugen87
Copy link
Collaborator

Mugen87 commented Feb 12, 2022

I wonder if it isn't better to introduce something like WebGL3DRenderTarget and/or WebGL2DArrayRenderTarget.

The current way of assigning a custom texture to WebGLRenderTarget feels like a hack to me. The texture reference of a render target should not be replaced.

@gkjohnson
Copy link
Collaborator

I've used the setTexture function to render to a texture 2d array but it felt like a bit of a hack to me, too, if only because it's undocumented. Adding WebGL3DRenderTarget and WebGL2DArrayRenderTarget seem like good solutions that line up with the other three.js classes. If setTexture is going to be kept I think the name of the function to be improved to better reflect it's behavior -- like setStorageTexture or something and be documented.

@mrdoob
Copy link
Owner

mrdoob commented Feb 15, 2022

@DavidPeicho FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants