{"action":"closed","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/5880","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/5880/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/5880/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/5880/events","html_url":"https://github.com/godotengine/godot/issues/5880","id":167194486,"number":5880,"title":"Cannot get world-space normal in fragment shader","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":283518839,"url":"https://api.github.com/repos/godotengine/godot/labels/documentation","name":"documentation","color":"ffbbff","default":false},{"id":279097966,"url":"https://api.github.com/repos/godotengine/godot/labels/topic:core","name":"topic:core","color":"ffdd44","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/godotengine/godot/milestones/5","html_url":"https://github.com/godotengine/godot/milestone/5","labels_url":"https://api.github.com/repos/godotengine/godot/milestones/5/labels","id":1449703,"number":5,"title":"2.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":70,"closed_issues":1169,"state":"open","created_at":"2015-12-08T11:42:22Z","updated_at":"2017-08-08T12:07:33Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2016-07-23T17:34:05Z","updated_at":"2017-08-08T12:07:33Z","closed_at":"2017-08-08T12:07:33Z","body":"Tested on Godot 2.0.4, Windows 10 64 bits\n\nI need to get the world-space normal of the model in a fragment shader, however all my attempts have failed so far.\nThere is no access to `SRC_NORMAL`, which is only available in the vertex shader.\nI also tried to use the formula indicated in the [documentation](http://docs.godotengine.org/en/latest/reference/shading_language.html#examples):\n\n``` glsl\n// Use reverse multiply because INV_CAMERA_MATRIX is world2cam\nvec3 world_normal = NORMAL * mat3(INV_CAMERA_MATRIX);\n```\n\nHowever this throws an error:\n\n```\nError precompiling shader: Invalid arguments to function/constructor: mat3\n```\n\n![terraineditor_shader_error](https://cloud.githubusercontent.com/assets/1311555/17079307/551578aa-510c-11e6-9498-2c3b3201450a.png)\n\nNote: if it's actually possible, maybe it's a documentation issue because the above line doesn't works.\n"}}
{"actor":{"display_login":"akien-mga"}}