Object Transform-Matrix in Shader
Asked Answered
I

2

0

Hello,
I am currently recreating a foliage shader from Unity into Godot. However I need the Transform-Matrix of the Object on which the shader is applied on.
Is there any way to access it or do I have to create a Uniform and apply it from the object onto the shader via script?

Thanks for the help.
Best Regards

Fab

Ieyasu answered 26/6, 2022 at 16:42 Comment(0)
C
0

It can be accessed in a shader as WORLD_MATRIX.
(MODEL_MATRIX in 4.0)

Chorister answered 26/6, 2022 at 17:6 Comment(0)
I
0

Chorister
Thanks, I somehow must have missed this. in The shader editor.

Ieyasu answered 26/6, 2022 at 20:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.