-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Shader language: implement arrays support #10751
Comments
makes sense but not for now, kicking to 3.1 |
Was asked in a Q&A thread: https://godotengine.org/qa/27228/array-godot-shader |
Hi, I'm throwing in my support for this feature. Currently trying to implement a simple 1d LUT for palette shifting and finding it difficult to work with my data since it's in an integer array format and not textures due to the relatively lopsided amount of outputs I need for a given input. Having arrays in-language would help a lot to avoid converting the tables I already have to sparse textures. |
I assume this is still being worked on for 3.1? Trying to implement a particle system that can reverse speed and go backward in time (like Prince of Persia rewind), but seeing how I can only access the individual particle data through a particle shader it'd be useful to store them in a uniform array to access by gdScript. |
bumping this because I need an array of arrays for an 8-bit mask to perform some autotiling functions now and I'm not sure of another way to work around this. Arrays are really sorely missing from the shading language.... edit: (and I'm not sure if even shader model 3 would be very happy with a 256-way branching function..) |
My water shader uses lots of copies of similar variables because array support is lacking right now. Would really need such a feature to make code neat. |
I started working on this. |
Apparently @arkinsamedi finished adding arrays in this commit? , can he confirm that its done and ready to merge? |
I really hope this is going to be in 3.2. |
This comment has been minimized.
This comment has been minimized.
For those wondering, here is a workaround using texture uniforms for the time being. gdscript
Shader
|
sampler arrays would be nice to have, you can't use a texture as a texture array after all. |
I see a 4.0 milestone. Sooo close... I'll settle for any type of uniform array support tbh 😁 |
3.2 has some array support! http://docs.godotengine.org/en/latest/tutorials/shading/shading_reference/shading_language.html#arrays |
Quite a number of people are still holding out specifically for uniform support, since transport seems to be what's necessitating the use case for most as compared to internal processing. |
Better if @reduz implements uniform arrays himself since I'm stuck with them hardly... |
Hi guys, currently working on a ray marching shader, hoping to dynamically create/modify shapes. Just to remind that this feature is really important in the eyes of some. |
Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine. The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker. If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance! |
This comment has been minimized.
This comment has been minimized.
@panicq Please don't bump issues without contributing significant new information. Use the 👍 reaction button on the first post instead. |
Proposal: godotengine/godot-proposals#931 |
as i understand there is no way right now to declare and use any arrays inside shaders like
float arr[] = float[] (1,2,3,4);
would be even more better to be able to declare them as uniforms or varying. and even better ( 🙄 ) to have multidimensional arrays.
The text was updated successfully, but these errors were encountered: