-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Add NoiseTexture3D and rename NoiseTexture to NoiseTexture2D. #64660
Conversation
Thanks for your work on this :) |
I will try to improve on that. Thanks for advice! |
In addition to my comment before, |
I needed to fix a couple of typos and add comments |
updated fork |
i hate my life rebase conflict defeated me i will try to improve it as much as possible and i give up for now with PR's |
Do you still have the code somewhere? This PR no longer includes any code, which makes it impossible for other people to salvage your work (if you no longer have time to work on it). |
I do. Here: https://github.com/Lasuch69/add_noisetexture3d/tree/add-noisetexture3d The problem is this function: https://github.com/Lasuch69/add_noisetexture3d/blob/cdf5a02c276165c27ad7a97d716b14d7a4106c47/drivers/vulkan/rendering_device_vulkan.cpp#L1147 on "for" loop iterates on mipmap levels (u_int) and sometimes it doesn't take into account lowest layers for example 1x1x4 is 7 pixels in total with mipmaps and godot only sees 4 because this function iterates only through layer 0. Layers are created by width and height only and depth isn't taken into account. Tbh i don't know what to do so feel free to do anything with this code you want. |
Add NoiseTexture3D and rename NoiseTexture to NoiseTexture2D.
This commit implements new resource NoiseTexture3D. Unfortunately it doesn't support seamless generation.
Note: Mipmaps are buggy as some resolutions (only lower than default) break format required size and can't intialize. Also if you change resolution too fast you get a size mismatch error.
As for Noise resource modification i only changed arguments for generation to support custom depth allowing for 3D coordinates to be used.
Bugsquad edit: This closes godotengine/godot-proposals#4946.