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

useFBO abstraction #149

Closed
4 tasks done
alvarosabu opened this issue Jul 26, 2023 · 4 comments · Fixed by #228
Closed
4 tasks done

useFBO abstraction #149

alvarosabu opened this issue Jul 26, 2023 · 4 comments · Fixed by #228
Assignees
Labels
good first issue Good for newcomers

Comments

@alvarosabu
Copy link
Member

Description

As a Developer using TresJS I would like to have a composable useFBO that leverages the effort of creating a THREE.WebGLRenderTarget

const target = useFBO({ stencilBuffer: false })

Drei's
https://github.com/pmndrs/drei/blob/master/src/core/useFBO.tsx

Reference:
https://github.com/pmndrs/drei/tree/master#usefbo

Suggested solution

Implement a composable that accepts:

  • width
  • height/
  • samples // Defines the count of MSAA samples. Can only be used with WebGL 2. Default: 0
  • depth // If set, the scene depth will be rendered into buffer.depthTexture. Default: false

And returns the renderTarget, The rendertarget should be automatically disposed when unmounted.

Alternative

No response

Additional context

No response

Validations

@kekkorider
Copy link
Collaborator

Any update on this? 🙂

@JaimeTorrealba
Copy link
Member

@kekkorider Would you like to take this?

@kekkorider
Copy link
Collaborator

I can give it a try 🤓

@JaimeTorrealba
Copy link
Member

@kekkorider fantastic!
We're here to help, so please feel free to contact me in discord (Io anche parlo italiano) or Alvaro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants