{"action":"created","issue":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/9517","repository_url":"https://api.github.com/repos/mrdoob/three.js","labels_url":"https://api.github.com/repos/mrdoob/three.js/issues/9517/labels{/name}","comments_url":"https://api.github.com/repos/mrdoob/three.js/issues/9517/comments","events_url":"https://api.github.com/repos/mrdoob/three.js/issues/9517/events","html_url":"https://github.com/mrdoob/three.js/issues/9517","id":171212057,"number":9517,"title":"Shading bug in ShaderLib.phong with Directional Lights","user":{"login":"TheJim01","id":7140478,"avatar_url":"https://avatars.githubusercontent.com/u/7140478?v=3","gravatar_id":"","url":"https://api.github.com/users/TheJim01","html_url":"https://github.com/TheJim01","followers_url":"https://api.github.com/users/TheJim01/followers","following_url":"https://api.github.com/users/TheJim01/following{/other_user}","gists_url":"https://api.github.com/users/TheJim01/gists{/gist_id}","starred_url":"https://api.github.com/users/TheJim01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheJim01/subscriptions","organizations_url":"https://api.github.com/users/TheJim01/orgs","repos_url":"https://api.github.com/users/TheJim01/repos","events_url":"https://api.github.com/users/TheJim01/events{/privacy}","received_events_url":"https://api.github.com/users/TheJim01/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-15T16:54:25Z","updated_at":"2016-08-16T00:37:47Z","closed_at":"2016-08-16T00:37:47Z","body":"##### Description of the problem \r\n\r\nI've been toying with lighting recently, and found a problem when pairing ShaderLib.phong with directional lights. An example fiddle is here: http://jsfiddle.net/TheJim01/oqa4wq0a/\r\n\r\nThe example has two cubes. On the left uses ShaderMaterial + ShaderLib.phong. The cube on the right uses MeshPhongMaterial. As the sides of the cubes reach shallow projection angles, you can see the cube on the left washes completely black, rather than smoothly blending like the cube on the right.\r\n\r\nThis does not happen when using point lights.\r\n\r\n\r\n##### Three.js version\r\n\r\n- [x] Dev\r\n- [x] r79\r\n- [x] tested back to r71\r\n\r\n##### Browser\r\n\r\n- [x] All of them\r\n\r\n##### OS\r\n\r\n- [x] All of them\r\n- [x] Windows\r\n- [x] Android\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/comments/239970635","html_url":"https://github.com/mrdoob/three.js/issues/9517#issuecomment-239970635","issue_url":"https://api.github.com/repos/mrdoob/three.js/issues/9517","id":239970635,"user":{"login":"mrdoob","id":97088,"avatar_url":"https://avatars.githubusercontent.com/u/97088?v=3","gravatar_id":"","url":"https://api.github.com/users/mrdoob","html_url":"https://github.com/mrdoob","followers_url":"https://api.github.com/users/mrdoob/followers","following_url":"https://api.github.com/users/mrdoob/following{/other_user}","gists_url":"https://api.github.com/users/mrdoob/gists{/gist_id}","starred_url":"https://api.github.com/users/mrdoob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrdoob/subscriptions","organizations_url":"https://api.github.com/users/mrdoob/orgs","repos_url":"https://api.github.com/users/mrdoob/repos","events_url":"https://api.github.com/users/mrdoob/events{/privacy}","received_events_url":"https://api.github.com/users/mrdoob/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T00:37:47Z","updated_at":"2016-08-16T00:37:47Z","body":"We have that already:\r\n\r\nhttps://github.com/mrdoob/three.js/blob/dev/src/renderers/WebGLRenderer.js#L2158\r\n\r\nUnfortunately we can't do anything about custom uniforms."}}
{"actor":{"display_login":"mrdoob"}}