{"action":"created","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/19212","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/19212/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/19212/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/19212/events","html_url":"https://github.com/godotengine/godot/issues/19212","id":326875445,"number":19212,"title":"NORMALMAP doesn't work if the mesh has no UVs","user":{"login":"Zylann","id":1311555,"avatar_url":"https://avatars1.githubusercontent.com/u/1311555?v=4","gravatar_id":"","url":"https://api.github.com/users/Zylann","html_url":"https://github.com/Zylann","followers_url":"https://api.github.com/users/Zylann/followers","following_url":"https://api.github.com/users/Zylann/following{/other_user}","gists_url":"https://api.github.com/users/Zylann/gists{/gist_id}","starred_url":"https://api.github.com/users/Zylann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zylann/subscriptions","organizations_url":"https://api.github.com/users/Zylann/orgs","repos_url":"https://api.github.com/users/Zylann/repos","events_url":"https://api.github.com/users/Zylann/events{/privacy}","received_events_url":"https://api.github.com/users/Zylann/received_events","type":"User","site_admin":false},"labels":[{"id":73330064,"url":"https://api.github.com/repos/godotengine/godot/labels/bug","name":"bug","color":"ff2222","default":true},{"id":279098111,"url":"https://api.github.com/repos/godotengine/godot/labels/topic:rendering","name":"topic:rendering","color":"ffdd44","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/godotengine/godot/milestones/7","html_url":"https://github.com/godotengine/godot/milestone/7","labels_url":"https://api.github.com/repos/godotengine/godot/milestones/7/labels","id":2529217,"number":7,"title":"3.1","description":"","creator":{"login":"akien-mga","id":4701338,"avatar_url":"https://avatars0.githubusercontent.com/u/4701338?v=4","gravatar_id":"","url":"https://api.github.com/users/akien-mga","html_url":"https://github.com/akien-mga","followers_url":"https://api.github.com/users/akien-mga/followers","following_url":"https://api.github.com/users/akien-mga/following{/other_user}","gists_url":"https://api.github.com/users/akien-mga/gists{/gist_id}","starred_url":"https://api.github.com/users/akien-mga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akien-mga/subscriptions","organizations_url":"https://api.github.com/users/akien-mga/orgs","repos_url":"https://api.github.com/users/akien-mga/repos","events_url":"https://api.github.com/users/akien-mga/events{/privacy}","received_events_url":"https://api.github.com/users/akien-mga/received_events","type":"User","site_admin":false},"open_issues":946,"closed_issues":1492,"state":"open","created_at":"2017-05-18T13:33:56Z","updated_at":"2018-05-28T14:35:23Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2018-05-28T02:18:13Z","updated_at":"2018-05-28T15:36:09Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Godot 3.0.2\r\n\r\nI ran in circles for about half an hour only to realize, that Godot is probably ignoring `NORMALMAP` in shaders if the mesh has no UVs...\r\nWhich is the case in my terrain plugin, since I get my UVs from VERTEX instead.\r\n\r\n![image](https://user-images.githubusercontent.com/1311555/40594191-ee7b1aca-622d-11e8-9246-df0f9701345e.png)\r\n\r\n![image](https://user-images.githubusercontent.com/1311555/40594198-050bc924-622e-11e8-9621-b78f0f7dc227.png)\r\n\r\nIs Godot doing such a thing even with ShaderMaterials, and why? "},"comment":{"url":"https://api.github.com/repos/godotengine/godot/issues/comments/392556800","html_url":"https://github.com/godotengine/godot/issues/19212#issuecomment-392556800","issue_url":"https://api.github.com/repos/godotengine/godot/issues/19212","id":392556800,"user":{"login":"Zylann","id":1311555,"avatar_url":"https://avatars1.githubusercontent.com/u/1311555?v=4","gravatar_id":"","url":"https://api.github.com/users/Zylann","html_url":"https://github.com/Zylann","followers_url":"https://api.github.com/users/Zylann/followers","following_url":"https://api.github.com/users/Zylann/following{/other_user}","gists_url":"https://api.github.com/users/Zylann/gists{/gist_id}","starred_url":"https://api.github.com/users/Zylann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zylann/subscriptions","organizations_url":"https://api.github.com/users/Zylann/orgs","repos_url":"https://api.github.com/users/Zylann/repos","events_url":"https://api.github.com/users/Zylann/events{/privacy}","received_events_url":"https://api.github.com/users/Zylann/received_events","type":"User","site_admin":false},"created_at":"2018-05-28T15:36:09Z","updated_at":"2018-05-28T15:36:09Z","author_association":"CONTRIBUTOR","body":"So I ended up with something that appears to work:\r\nI simply keep the existing shader, but instead of using WORLD_MATRIX to transform normals, I multiply my normals by `basis.inverse().transposed()` (calculated in GDScript and sent with a uniform). After doing this both in vertex and fragment shaders for terrain normals AND normal maps, I got it working with everything in NORMAL.\r\n\r\nSo in the end I'm still not using NORMALMAP and still not calculating BINORMAL and TANGENT... I'm not sure what this implies even though the result looks correct."}}
{"actor":{"display_login":"Zylann"}}