Fake-Interior-Shader-for-GodotEngine icon indicating copy to clipboard operation
Fake-Interior-Shader-for-GodotEngine copied to clipboard

[Godot 4.0] Shader only works if the mesh is pointing towards Z+

Open Cyrus-Harding opened this issue 4 years ago • 8 comments

Mesh pointing towards positive Z: image

Mesh pointing towards negative Z: image

Cyrus-Harding avatar Mar 24 '21 15:03 Cyrus-Harding

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.

Cyrus-Harding avatar Mar 24 '21 17:03 Cyrus-Harding

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.

OBKF avatar Mar 24 '21 20:03 OBKF

Thank you very much.

I am looking forward for the update!

Cyrus-Harding avatar Mar 24 '21 20:03 Cyrus-Harding

Thank you for using it.

OBKF avatar Mar 24 '21 20:03 OBKF

@kimabjorkede Hi, the new update is UP, can you try it?

OBKF avatar Nov 11 '21 06:11 OBKF

Now its like this:

https://user-images.githubusercontent.com/70962730/196826390-8692fa8b-62f1-4961-9e1f-61429b630343.mp4

wp2000x avatar Oct 20 '22 00:10 wp2000x