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

Implement GPU Painting #174

Open
TokisanGames opened this issue Aug 5, 2023 · 5 comments
Open

Implement GPU Painting #174

TokisanGames opened this issue Aug 5, 2023 · 5 comments
Labels
enhancement New feature or request low priority Low Priority
Milestone

Comments

@TokisanGames
Copy link
Owner

TokisanGames commented Aug 5, 2023

Painting large areas like a mountain is quite difficult, and smoothing is impossibly slow.

There are some pending issues in Godot that may be needed before it is feasible:

However there are these possibilities right now:

  1. Zylann reports that his GPU painter can read and write 32-bit floats, with some encoding, but it's lossless and sufficient to allow GPU painting
  2. Bastian Olij recently merged updates to compute shaders and says we now have everything we need. He made a demo showing a compute shader texture
  3. Completed: Vulkan: Cannot retrieve HDR texture from Viewport (LDR texture is returned instead)
@TokisanGames TokisanGames added enhancement New feature or request low priority Low Priority labels Aug 5, 2023
@TokisanGames TokisanGames modified the milestones: Future, Stable Aug 5, 2023
@TokisanGames TokisanGames moved this to Stable Release in @Terrain Aug 5, 2023
@Saul2022
Copy link

Saul2022 commented Aug 5, 2023

And also when using a bigger brush size, it becomes too laggy to even move, because of the lack of that.

@Oracuda
Copy link

Oracuda commented Aug 18, 2023

couldn't this just be done by drawing to a canvasitem then using get_texture and reuploading the texture to gpu? wouldn't be more ideal than using sub texture but its what zylan's implementation does afaik

@TokisanGames
Copy link
Owner Author

@Oracuda drawing to a canvas item means drawing to a viewport, which requires a 16-32 bit viewport, and hasn't been available until recently. See # 3 which provides 16-bit viewports. That still might produce artifacts under certain circumstances, and we may still need partial updates on textures.

I think the compute shader is going to be the way to go as we won't be limited by format.

@ArtyIF
Copy link

ArtyIF commented Jan 2, 2024

I'd suggest letting the user increase the size manually by typing in a bigger value into the textbox. I've gotten tolerable performance on brushes as big as 500m after increasing the brush size limit.

@TokisanGames
Copy link
Owner Author

@ArtyIF allowed in 1ff769d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority Low Priority
Projects
Development

No branches or pull requests

4 participants