Fake-Interior-Shader-for-GodotEngine
Fake-Interior-Shader-for-GodotEngine copied to clipboard
[Godot 4.0] Shader only works if the mesh is pointing towards Z+
Mesh pointing towards positive Z:

Mesh pointing towards negative Z:

Changing
vec3 I = normalize(vertexW - CameraPosition);
to
vec3 I = -normalize(vertexW - CameraPosition);
Makes it work pointing towards -Z.
Pointing it towards X- or X+ also makes it not work.
Hello @kimamb ,
I am aware of the issue, and already working on the fix, I am trying to simplify the new implementation so it can perform well in large scenes.
Thank you very much.
I am looking forward for the update!
Thank you for using it.
@kimabjorkede Hi, the new update is UP, can you try it?
Now its like this:
https://user-images.githubusercontent.com/70962730/196826390-8692fa8b-62f1-4961-9e1f-61429b630343.mp4