[Godot 4.0] Shader only works if the mesh is pointing towards Z+
kimabjorkede opened this issue · 8 comments
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:
Godot_v4.0-beta3_mono_win64_2022-10-20_01-59-04.mp4
Yup my friend and I are facing this very same issue. Fixed the hints for godot 4 but the shader seems broken on certain meshes for some reason. The middle building works perfectly but the ones to the side have the exact issue as the above video. Exporting glb from blender? same issue. It works on a csgmesh > planemesh though.
Yup my friend and I are facing this very same issue. Fixed the hints for godot 4 but the shader seems broken on certain meshes for some reason. The middle building works perfectly but the ones to the side have the exact issue as the above video. Exporting glb from blender? same issue. It works on a csgmesh > planemesh though.
as far as i remember, it was becaose of the mesh object origin point.