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
Issue Description:
Creating a vertex bending shader using INV_VIEW_MATRIX produces no shadows wile using a different value (for example TIME) does produce a shadow.
Expected Behavior:
Shadows should be rendered accurately when utilizing the INV_VIEW_MATRIX in the vertex shader, similar to how they are rendered when using values like TIME.
When manually supplying the shader with the position of the active camera the shadows are drawn correctly.
There is no visual difference between INV_VIEW_MATRIX and a manual camera position.
In 4.3 we introduced a new built in variable to handle this situation: MAIN_CAM_INV_VIEW_MATRIX. Use that instead of INV_VIEW_MATRIX as INV_VIEW_MATRIX is the matrix used for rendering the object not the matrix from the camera in your scene.
There is an important distinction here because when rendering shadow maps the camera used is based on the position and orientation of the light.
Tested versions
System information
Godot v4.2.2.stable - Ubuntu 23.10 23.10 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (nvidia; 545.29.06) - AMD Ryzen 7 3700X 8-Core Processor (16 Threads)
Issue description
Issue Description:
Creating a vertex bending shader using
INV_VIEW_MATRIX
produces no shadows wile using a different value (for exampleTIME
) does produce a shadow.Expected Behavior:
Shadows should be rendered accurately when utilizing the
INV_VIEW_MATRIX
in the vertex shader, similar to how they are rendered when using values like TIME.Shader objects left (image):
Shader objects right (image):
This also exists in Godot 3 with the following shader:
Steps to reproduce
Minimal reproduction project (MRP)
The text was updated successfully, but these errors were encountered: