You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
Following up on: godotengine/godot-docs#5895 and godotengine/godot-docs#5963
It takes quite longer to create the same effects in Visual Shaders as the same ones in pure shader code. As an example you could copy paste the given examples of the PRs above and have very quickly access to the world's position of the object or the camera.
Furthermore since also for example people with a pure artistic background want to have quick access to these variables they usually have to ask in e.g. the Godot's Discord community how they can access a specific variable.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Expose the following variables which can be calculated with input matrices as Visual Shader Nodes:
Object's world position
Camera's World position
World space direction of the camera
Camera's view direction to the object in view space
Disclaimer: I have mostly experience with Spatial Shaders and would happily expand the proposal to Canvas Item Shaders if given examples can be given.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
see the above mentioned godot-docs PRs:
vec3 model_world_space = MODEL_MATRIX[3].xyz; // Object's world space position. This is the equivalent to global_transform.origin in GDScript.
mat3 model_transform_basis = mat3(MODEL_MATRIX); // Object's world space transform basis. This is the equivalent to global_transform.basis in GDScript.
vec3 camera_world_space = INV_VIEW_MATRIX[3].xyz; // Camera's world space position. This is the equivalent to camera.global_transform.origin in GDScript.
vec3 camera_eye_world_space = VIEW_MATRIX[3].xyz; // Camera eye vector in world space direction of the camera.
vec3 camera_to_object_world_space = normalize(MODEL_MATRIX[3].xyz - INV_VIEW_MATRIX[3].xyz); // Camera's direction to the object in world space.
If this enhancement will not be used often, can it be worked around with a few lines of script?
It could be created as a Custom Visual Shader Node add-on
Is there a reason why this should be core and not an add-on in the asset library?
This is a Quality of Life improvement for the Visual Shader Editor and would be used by everyone using the visual shader editor.
The text was updated successfully, but these errors were encountered:
Describe the project you are working on
(Visual) Shaders and VFX
Describe the problem or limitation you are having in your project
Following up on: godotengine/godot-docs#5895 and godotengine/godot-docs#5963
It takes quite longer to create the same effects in Visual Shaders as the same ones in pure shader code. As an example you could copy paste the given examples of the PRs above and have very quickly access to the world's position of the object or the camera.
Furthermore since also for example people with a pure artistic background want to have quick access to these variables they usually have to ask in e.g. the Godot's Discord community how they can access a specific variable.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Expose the following variables which can be calculated with input matrices as Visual Shader Nodes:
Disclaimer:
I have mostly experience with Spatial Shaders and would happily expand the proposal to Canvas Item Shaders if given examples can be given.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
see the above mentioned godot-docs PRs:
If this enhancement will not be used often, can it be worked around with a few lines of script?
It could be created as a Custom Visual Shader Node add-on
Is there a reason why this should be core and not an add-on in the asset library?
This is a Quality of Life improvement for the Visual Shader Editor and would be used by everyone using the visual shader editor.
The text was updated successfully, but these errors were encountered: