{"action":"created","comment":{"url":"https://api.github.com/repos/mrdoob/three.js/pulls/comments/43411449","id":43411449,"diff_hunk":"@@ -107,7 +107,7 @@ vec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, vec3 spe\n \n \tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n \n-\treturn specularColor * AB.x + AB.y;\n+\treturn ( specularColor * AB.x + AB.y ) * grazingColor;","path":"src/renderers/shaders/ShaderChunk/bsdfs.glsl","position":50,"original_position":50,"commit_id":"daa33c972876ea6ac427996b74660abeeb60147c","original_commit_id":"daa33c972876ea6ac427996b74660abeeb60147c","user":{"login":"bhouston","id":588541,"avatar_url":"https://avatars.githubusercontent.com/u/588541?v=3","gravatar_id":"","url":"https://api.github.com/users/bhouston","html_url":"https://github.com/bhouston","followers_url":"https://api.github.com/users/bhouston/followers","following_url":"https://api.github.com/users/bhouston/following{/other_user}","gists_url":"https://api.github.com/users/bhouston/gists{/gist_id}","starred_url":"https://api.github.com/users/bhouston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhouston/subscriptions","organizations_url":"https://api.github.com/users/bhouston/orgs","repos_url":"https://api.github.com/users/bhouston/repos","events_url":"https://api.github.com/users/bhouston/events{/privacy}","received_events_url":"https://api.github.com/users/bhouston/received_events","type":"User","site_admin":false},"body":"We do need to have an unoptimized version of the environment BRDF.  This formulation is correct at the bounds of the metalness function, whether it is correct within the middle is harder to known as I am not sure the answer is clear.","created_at":"2015-10-29T16:47:08Z","updated_at":"2015-10-29T16:47:08Z","html_url":"https://github.com/mrdoob/three.js/pull/7417#discussion_r43411449","pull_request_url":"https://api.github.com/repos/mrdoob/three.js/pulls/7417","_links":{"self":{"href":"https://api.github.com/repos/mrdoob/three.js/pulls/comments/43411449"},"html":{"href":"https://github.com/mrdoob/three.js/pull/7417#discussion_r43411449"},"pull_request":{"href":"https://api.github.com/repos/mrdoob/three.js/pulls/7417"}}},"pull_request":{"url":"https://api.github.com/repos/mrdoob/three.js/pulls/7417","id":48577645,"html_url":"https://github.com/mrdoob/three.js/pull/7417","diff_url":"https://github.com/mrdoob/three.js/pull/7417.diff","patch_url":"https://github.com/mrdoob/three.js/pull/7417.patch","issue_url":"https://api.github.com/repos/mrdoob/three.js/issues/7417","number":7417,"state":"open","locked":false,"title":"Grazing angle metalness","user":{"login":"bhouston","id":588541,"avatar_url":"https://avatars.githubusercontent.com/u/588541?v=3","gravatar_id":"","url":"https://api.github.com/users/bhouston","html_url":"https://github.com/bhouston","followers_url":"https://api.github.com/users/bhouston/followers","following_url":"https://api.github.com/users/bhouston/following{/other_user}","gists_url":"https://api.github.com/users/bhouston/gists{/gist_id}","starred_url":"https://api.github.com/users/bhouston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhouston/subscriptions","organizations_url":"https://api.github.com/users/bhouston/orgs","repos_url":"https://api.github.com/users/bhouston/repos","events_url":"https://api.github.com/users/bhouston/events{/privacy}","received_events_url":"https://api.github.com/users/bhouston/received_events","type":"User","site_admin":false},"body":"This is built upon the simplified lighting PR: #7324\r\n\r\nThis fixes an issue with Physical Material in that the grazing angles of the materials with high metalness should use the metal color, rather than going to white (mentioned in #7397).  This is because metals should be conductive fresnel (goes to metal color at grazing angles) rather than dielectric fresnel (goes to white at grazing angles).  I implemented this via allowing F_Shlick to take a grazingColor.  One could alternatively implement this via a mix of F_Shchlick result with the diffuse color based on metalness, but that was more awkward to implement, because it would make the GGX Specular BRDF aware internally of metalness.","created_at":"2015-10-23T13:07:32Z","updated_at":"2015-10-29T16:47:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f63474d01dd36b17b3424bc77153d2c5b167472a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mrdoob/three.js/pulls/7417/commits","review_comments_url":"https://api.github.com/repos/mrdoob/three.js/pulls/7417/comments","review_comment_url":"https://api.github.com/repos/mrdoob/three.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mrdoob/three.js/issues/7417/comments","statuses_url":"https://api.github.com/repos/mrdoob/three.js/statuses/daa33c972876ea6ac427996b74660abeeb60147c","head":{"label":"bhouston:grazingAngleMetalness","ref":"grazingAngleMetalness","sha":"daa33c972876ea6ac427996b74660abeeb60147c","user":{"login":"bhouston","id":588541,"avatar_url":"https://avatars.githubusercontent.com/u/588541?v=3","gravatar_id":"","url":"https://api.github.com/users/bhouston","html_url":"https://github.com/bhouston","followers_url":"https://api.github.com/users/bhouston/followers","following_url":"https://api.github.com/users/bhouston/following{/other_user}","gists_url":"https://api.github.com/users/bhouston/gists{/gist_id}","starred_url":"https://api.github.com/users/bhouston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhouston/subscriptions","organizations_url":"https://api.github.com/users/bhouston/orgs","repos_url":"https://api.github.com/users/bhouston/repos","events_url":"https://api.github.com/users/bhouston/events{/privacy}","received_events_url":"https://api.github.com/users/bhouston/received_events","type":"User","site_admin":false},"repo":{"id":6941890,"name":"three.js","full_name":"bhouston/three.js","owner":{"login":"bhouston","id":588541,"avatar_url":"https://avatars.githubusercontent.com/u/588541?v=3","gravatar_id":"","url":"https://api.github.com/users/bhouston","html_url":"https://github.com/bhouston","followers_url":"https://api.github.com/users/bhouston/followers","following_url":"https://api.github.com/users/bhouston/following{/other_user}","gists_url":"https://api.github.com/users/bhouston/gists{/gist_id}","starred_url":"https://api.github.com/users/bhouston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhouston/subscriptions","organizations_url":"https://api.github.com/users/bhouston/orgs","repos_url":"https://api.github.com/users/bhouston/repos","events_url":"https://api.github.com/users/bhouston/events{/privacy}","received_events_url":"https://api.github.com/users/bhouston/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bhouston/three.js","description":"JavaScript 3D library.","fork":true,"url":"https://api.github.com/repos/bhouston/three.js","forks_url":"https://api.github.com/repos/bhouston/three.js/forks","keys_url":"https://api.github.com/repos/bhouston/three.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bhouston/three.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bhouston/three.js/teams","hooks_url":"https://api.github.com/repos/bhouston/three.js/hooks","issue_events_url":"https://api.github.com/repos/bhouston/three.js/issues/events{/number}","events_url":"https://api.github.com/repos/bhouston/three.js/events","assignees_url":"https://api.github.com/repos/bhouston/three.js/assignees{/user}","branches_url":"https://api.github.com/repos/bhouston/three.js/branches{/branch}","tags_url":"https://api.github.com/repos/bhouston/three.js/tags","blobs_url":"https://api.github.com/repos/bhouston/three.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bhouston/three.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bhouston/three.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/bhouston/three.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bhouston/three.js/statuses/{sha}","languages_url":"https://api.github.com/repos/bhouston/three.js/languages","stargazers_url":"https://api.github.com/repos/bhouston/three.js/stargazers","contributors_url":"https://api.github.com/repos/bhouston/three.js/contributors","subscribers_url":"https://api.github.com/repos/bhouston/three.js/subscribers","subscription_url":"https://api.github.com/repos/bhouston/three.js/subscription","commits_url":"https://api.github.com/repos/bhouston/three.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/bhouston/three.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/bhouston/three.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/bhouston/three.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/bhouston/three.js/contents/{+path}","compare_url":"https://api.github.com/repos/bhouston/three.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bhouston/three.js/merges","archive_url":"https://api.github.com/repos/bhouston/three.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bhouston/three.js/downloads","issues_url":"https://api.github.com/repos/bhouston/three.js/issues{/number}","pulls_url":"https://api.github.com/repos/bhouston/three.js/pulls{/number}","milestones_url":"https://api.github.com/repos/bhouston/three.js/milestones{/number}","notifications_url":"https://api.github.com/repos/bhouston/three.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bhouston/three.js/labels{/name}","releases_url":"https://api.github.com/repos/bhouston/three.js/releases{/id}","created_at":"2012-11-30T16:19:02Z","updated_at":"2014-01-07T03:12:34Z","pushed_at":"2015-10-29T15:28:03Z","git_url":"git://github.com/bhouston/three.js.git","ssh_url":"git@github.com:bhouston/three.js.git","clone_url":"https://github.com/bhouston/three.js.git","svn_url":"https://github.com/bhouston/three.js","homepage":"http://threejs.org/","size":335199,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"mrdoob:dev","ref":"dev","sha":"029515a332e858e33ca81d554fd7c05fe7cdc2b4","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},"repo":{"id":576201,"name":"three.js","full_name":"mrdoob/three.js","owner":{"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},"private":false,"html_url":"https://github.com/mrdoob/three.js","description":"JavaScript 3D library.","fork":false,"url":"https://api.github.com/repos/mrdoob/three.js","forks_url":"https://api.github.com/repos/mrdoob/three.js/forks","keys_url":"https://api.github.com/repos/mrdoob/three.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrdoob/three.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrdoob/three.js/teams","hooks_url":"https://api.github.com/repos/mrdoob/three.js/hooks","issue_events_url":"https://api.github.com/repos/mrdoob/three.js/issues/events{/number}","events_url":"https://api.github.com/repos/mrdoob/three.js/events","assignees_url":"https://api.github.com/repos/mrdoob/three.js/assignees{/user}","branches_url":"https://api.github.com/repos/mrdoob/three.js/branches{/branch}","tags_url":"https://api.github.com/repos/mrdoob/three.js/tags","blobs_url":"https://api.github.com/repos/mrdoob/three.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrdoob/three.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrdoob/three.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrdoob/three.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrdoob/three.js/statuses/{sha}","languages_url":"https://api.github.com/repos/mrdoob/three.js/languages","stargazers_url":"https://api.github.com/repos/mrdoob/three.js/stargazers","contributors_url":"https://api.github.com/repos/mrdoob/three.js/contributors","subscribers_url":"https://api.github.com/repos/mrdoob/three.js/subscribers","subscription_url":"https://api.github.com/repos/mrdoob/three.js/subscription","commits_url":"https://api.github.com/repos/mrdoob/three.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrdoob/three.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrdoob/three.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrdoob/three.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrdoob/three.js/contents/{+path}","compare_url":"https://api.github.com/repos/mrdoob/three.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrdoob/three.js/merges","archive_url":"https://api.github.com/repos/mrdoob/three.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrdoob/three.js/downloads","issues_url":"https://api.github.com/repos/mrdoob/three.js/issues{/number}","pulls_url":"https://api.github.com/repos/mrdoob/three.js/pulls{/number}","milestones_url":"https://api.github.com/repos/mrdoob/three.js/milestones{/number}","notifications_url":"https://api.github.com/repos/mrdoob/three.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrdoob/three.js/labels{/name}","releases_url":"https://api.github.com/repos/mrdoob/three.js/releases{/id}","created_at":"2010-03-23T18:58:01Z","updated_at":"2015-10-29T16:14:14Z","pushed_at":"2015-10-29T15:28:06Z","git_url":"git://github.com/mrdoob/three.js.git","ssh_url":"git@github.com:mrdoob/three.js.git","clone_url":"https://github.com/mrdoob/three.js.git","svn_url":"https://github.com/mrdoob/three.js","homepage":"http://threejs.org/","size":425222,"stargazers_count":21753,"watchers_count":21753,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":6766,"mirror_url":null,"open_issues_count":519,"forks":6766,"open_issues":519,"watchers":21753,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mrdoob/three.js/pulls/7417"},"html":{"href":"https://github.com/mrdoob/three.js/pull/7417"},"issue":{"href":"https://api.github.com/repos/mrdoob/three.js/issues/7417"},"comments":{"href":"https://api.github.com/repos/mrdoob/three.js/issues/7417/comments"},"review_comments":{"href":"https://api.github.com/repos/mrdoob/three.js/pulls/7417/comments"},"review_comment":{"href":"https://api.github.com/repos/mrdoob/three.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mrdoob/three.js/pulls/7417/commits"},"statuses":{"href":"https://api.github.com/repos/mrdoob/three.js/statuses/daa33c972876ea6ac427996b74660abeeb60147c"}}}}