{"action":"created","comment":{"url":"https://api.github.com/repos/appleseedhq/appleseed/pulls/comments/34437635","id":34437635,"diff_hunk":"@@ -635,9 +636,44 @@ void CompositeEmissionClosure::process_closure_tree(\n       case OSL::ClosureColor::COMPONENT:\n         {\n             const OSL::ClosureComponent* c = reinterpret_cast<const OSL::ClosureComponent*>(closure);\n+            const Color3f w = weight * Color3f(c->w);\n \n-            if (c->id == EmissionID)\n-                m_total_weight += weight * Color3f(c->w);\n+            if (c->id == SubsurfaceID)\n+            {\n+                const SubsurfaceClosureParams* p =\n+                    reinterpret_cast<const SubsurfaceClosureParams*>(c->data());\n+\n+                if (p->profile == directional_profile_name)\n+                {\n+                    DirectionalDipoleBSSRDFInputValues values;\n+                    values.m_reflectance = Color3f(p->reflectance);\n+                    values.m_mean_free_path = Color3f(p->mean_free_path);\n+                    values.m_mean_free_path_multiplier = 1.0;\n+                    values.m_anisotropy = 0.0;\n+                    values.m_from_ior = 1.0;\n+                    values.m_to_ior = 1.0 / p->eta;\n+\n+                    add_closure<DirectionalDipoleBSSRDFInputValues>(\n+                        SubsurfaceDirectionalID,\n+                        w,\n+                        values);\n+\n+                }\n+                else // if (p->profile == normalized_profile_name)","path":"src/appleseed/renderer/kernel/shading/closures.cpp","position":141,"original_position":141,"commit_id":"27b5419691cee35a16951215d276b1198254f963","original_commit_id":"27b5419691cee35a16951215d276b1198254f963","user":{"login":"dictoon","id":321290,"avatar_url":"https://avatars.githubusercontent.com/u/321290?v=3","gravatar_id":"","url":"https://api.github.com/users/dictoon","html_url":"https://github.com/dictoon","followers_url":"https://api.github.com/users/dictoon/followers","following_url":"https://api.github.com/users/dictoon/following{/other_user}","gists_url":"https://api.github.com/users/dictoon/gists{/gist_id}","starred_url":"https://api.github.com/users/dictoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dictoon/subscriptions","organizations_url":"https://api.github.com/users/dictoon/orgs","repos_url":"https://api.github.com/users/dictoon/repos","events_url":"https://api.github.com/users/dictoon/events{/privacy}","received_events_url":"https://api.github.com/users/dictoon/received_events","type":"User","site_admin":false},"body":"Materialize that comment with an assert.","created_at":"2015-07-13T07:13:18Z","updated_at":"2015-07-13T07:13:18Z","html_url":"https://github.com/appleseedhq/appleseed/pull/780#discussion_r34437635","pull_request_url":"https://api.github.com/repos/appleseedhq/appleseed/pulls/780","_links":{"self":{"href":"https://api.github.com/repos/appleseedhq/appleseed/pulls/comments/34437635"},"html":{"href":"https://github.com/appleseedhq/appleseed/pull/780#discussion_r34437635"},"pull_request":{"href":"https://api.github.com/repos/appleseedhq/appleseed/pulls/780"}}},"pull_request":{"url":"https://api.github.com/repos/appleseedhq/appleseed/pulls/780","id":39768505,"html_url":"https://github.com/appleseedhq/appleseed/pull/780","diff_url":"https://github.com/appleseedhq/appleseed/pull/780.diff","patch_url":"https://github.com/appleseedhq/appleseed/pull/780.patch","issue_url":"https://api.github.com/repos/appleseedhq/appleseed/issues/780","number":780,"state":"open","locked":false,"title":"More SSS work","user":{"login":"est77","id":409013,"avatar_url":"https://avatars.githubusercontent.com/u/409013?v=3","gravatar_id":"","url":"https://api.github.com/users/est77","html_url":"https://github.com/est77","followers_url":"https://api.github.com/users/est77/followers","following_url":"https://api.github.com/users/est77/following{/other_user}","gists_url":"https://api.github.com/users/est77/gists{/gist_id}","starred_url":"https://api.github.com/users/est77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/est77/subscriptions","organizations_url":"https://api.github.com/users/est77/orgs","repos_url":"https://api.github.com/users/est77/repos","events_url":"https://api.github.com/users/est77/events{/privacy}","received_events_url":"https://api.github.com/users/est77/received_events","type":"User","site_admin":false},"body":"- BSSRDF interface refinements and improvements.\r\n- Added placeholder for normalized diffusion BSSRDF.\r\n- Fixed Intersector::trace_same_material.\r\n- Added some OSL subsurface closures code.\r\n- Refactored OSL closures code.\r\n- Started incorporating SSS code in the path tracer.\r\n- Small misc fixes & improvements.","created_at":"2015-07-12T20:54:09Z","updated_at":"2015-07-13T07:13:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ccb16c409f18e9d01709f433e04a2be5e1517970","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/appleseedhq/appleseed/pulls/780/commits","review_comments_url":"https://api.github.com/repos/appleseedhq/appleseed/pulls/780/comments","review_comment_url":"https://api.github.com/repos/appleseedhq/appleseed/pulls/comments{/number}","comments_url":"https://api.github.com/repos/appleseedhq/appleseed/issues/780/comments","statuses_url":"https://api.github.com/repos/appleseedhq/appleseed/statuses/27b5419691cee35a16951215d276b1198254f963","head":{"label":"est77:est_sss3","ref":"est_sss3","sha":"27b5419691cee35a16951215d276b1198254f963","user":{"login":"est77","id":409013,"avatar_url":"https://avatars.githubusercontent.com/u/409013?v=3","gravatar_id":"","url":"https://api.github.com/users/est77","html_url":"https://github.com/est77","followers_url":"https://api.github.com/users/est77/followers","following_url":"https://api.github.com/users/est77/following{/other_user}","gists_url":"https://api.github.com/users/est77/gists{/gist_id}","starred_url":"https://api.github.com/users/est77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/est77/subscriptions","organizations_url":"https://api.github.com/users/est77/orgs","repos_url":"https://api.github.com/users/est77/repos","events_url":"https://api.github.com/users/est77/events{/privacy}","received_events_url":"https://api.github.com/users/est77/received_events","type":"User","site_admin":false},"repo":{"id":10621343,"name":"appleseed","full_name":"est77/appleseed","owner":{"login":"est77","id":409013,"avatar_url":"https://avatars.githubusercontent.com/u/409013?v=3","gravatar_id":"","url":"https://api.github.com/users/est77","html_url":"https://github.com/est77","followers_url":"https://api.github.com/users/est77/followers","following_url":"https://api.github.com/users/est77/following{/other_user}","gists_url":"https://api.github.com/users/est77/gists{/gist_id}","starred_url":"https://api.github.com/users/est77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/est77/subscriptions","organizations_url":"https://api.github.com/users/est77/orgs","repos_url":"https://api.github.com/users/est77/repos","events_url":"https://api.github.com/users/est77/events{/privacy}","received_events_url":"https://api.github.com/users/est77/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/est77/appleseed","description":"appleseed is a modern, physically-based production renderer.","fork":true,"url":"https://api.github.com/repos/est77/appleseed","forks_url":"https://api.github.com/repos/est77/appleseed/forks","keys_url":"https://api.github.com/repos/est77/appleseed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/est77/appleseed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/est77/appleseed/teams","hooks_url":"https://api.github.com/repos/est77/appleseed/hooks","issue_events_url":"https://api.github.com/repos/est77/appleseed/issues/events{/number}","events_url":"https://api.github.com/repos/est77/appleseed/events","assignees_url":"https://api.github.com/repos/est77/appleseed/assignees{/user}","branches_url":"https://api.github.com/repos/est77/appleseed/branches{/branch}","tags_url":"https://api.github.com/repos/est77/appleseed/tags","blobs_url":"https://api.github.com/repos/est77/appleseed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/est77/appleseed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/est77/appleseed/git/refs{/sha}","trees_url":"https://api.github.com/repos/est77/appleseed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/est77/appleseed/statuses/{sha}","languages_url":"https://api.github.com/repos/est77/appleseed/languages","stargazers_url":"https://api.github.com/repos/est77/appleseed/stargazers","contributors_url":"https://api.github.com/repos/est77/appleseed/contributors","subscribers_url":"https://api.github.com/repos/est77/appleseed/subscribers","subscription_url":"https://api.github.com/repos/est77/appleseed/subscription","commits_url":"https://api.github.com/repos/est77/appleseed/commits{/sha}","git_commits_url":"https://api.github.com/repos/est77/appleseed/git/commits{/sha}","comments_url":"https://api.github.com/repos/est77/appleseed/comments{/number}","issue_comment_url":"https://api.github.com/repos/est77/appleseed/issues/comments{/number}","contents_url":"https://api.github.com/repos/est77/appleseed/contents/{+path}","compare_url":"https://api.github.com/repos/est77/appleseed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/est77/appleseed/merges","archive_url":"https://api.github.com/repos/est77/appleseed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/est77/appleseed/downloads","issues_url":"https://api.github.com/repos/est77/appleseed/issues{/number}","pulls_url":"https://api.github.com/repos/est77/appleseed/pulls{/number}","milestones_url":"https://api.github.com/repos/est77/appleseed/milestones{/number}","notifications_url":"https://api.github.com/repos/est77/appleseed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/est77/appleseed/labels{/name}","releases_url":"https://api.github.com/repos/est77/appleseed/releases{/id}","created_at":"2013-06-11T12:49:35Z","updated_at":"2015-04-30T17:28:14Z","pushed_at":"2015-07-12T20:53:24Z","git_url":"git://github.com/est77/appleseed.git","ssh_url":"git@github.com:est77/appleseed.git","clone_url":"https://github.com/est77/appleseed.git","svn_url":"https://github.com/est77/appleseed","homepage":"http://appleseedhq.net/","size":538010,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"appleseedhq:master","ref":"master","sha":"aade6bb5accc8036dd96e80c82de8a01faa68841","user":{"login":"appleseedhq","id":6373510,"avatar_url":"https://avatars.githubusercontent.com/u/6373510?v=3","gravatar_id":"","url":"https://api.github.com/users/appleseedhq","html_url":"https://github.com/appleseedhq","followers_url":"https://api.github.com/users/appleseedhq/followers","following_url":"https://api.github.com/users/appleseedhq/following{/other_user}","gists_url":"https://api.github.com/users/appleseedhq/gists{/gist_id}","starred_url":"https://api.github.com/users/appleseedhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appleseedhq/subscriptions","organizations_url":"https://api.github.com/users/appleseedhq/orgs","repos_url":"https://api.github.com/users/appleseedhq/repos","events_url":"https://api.github.com/users/appleseedhq/events{/privacy}","received_events_url":"https://api.github.com/users/appleseedhq/received_events","type":"Organization","site_admin":false},"repo":{"id":753784,"name":"appleseed","full_name":"appleseedhq/appleseed","owner":{"login":"appleseedhq","id":6373510,"avatar_url":"https://avatars.githubusercontent.com/u/6373510?v=3","gravatar_id":"","url":"https://api.github.com/users/appleseedhq","html_url":"https://github.com/appleseedhq","followers_url":"https://api.github.com/users/appleseedhq/followers","following_url":"https://api.github.com/users/appleseedhq/following{/other_user}","gists_url":"https://api.github.com/users/appleseedhq/gists{/gist_id}","starred_url":"https://api.github.com/users/appleseedhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appleseedhq/subscriptions","organizations_url":"https://api.github.com/users/appleseedhq/orgs","repos_url":"https://api.github.com/users/appleseedhq/repos","events_url":"https://api.github.com/users/appleseedhq/events{/privacy}","received_events_url":"https://api.github.com/users/appleseedhq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/appleseedhq/appleseed","description":"appleseed is a modern, physically-based production renderer.","fork":false,"url":"https://api.github.com/repos/appleseedhq/appleseed","forks_url":"https://api.github.com/repos/appleseedhq/appleseed/forks","keys_url":"https://api.github.com/repos/appleseedhq/appleseed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appleseedhq/appleseed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appleseedhq/appleseed/teams","hooks_url":"https://api.github.com/repos/appleseedhq/appleseed/hooks","issue_events_url":"https://api.github.com/repos/appleseedhq/appleseed/issues/events{/number}","events_url":"https://api.github.com/repos/appleseedhq/appleseed/events","assignees_url":"https://api.github.com/repos/appleseedhq/appleseed/assignees{/user}","branches_url":"https://api.github.com/repos/appleseedhq/appleseed/branches{/branch}","tags_url":"https://api.github.com/repos/appleseedhq/appleseed/tags","blobs_url":"https://api.github.com/repos/appleseedhq/appleseed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appleseedhq/appleseed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appleseedhq/appleseed/git/refs{/sha}","trees_url":"https://api.github.com/repos/appleseedhq/appleseed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appleseedhq/appleseed/statuses/{sha}","languages_url":"https://api.github.com/repos/appleseedhq/appleseed/languages","stargazers_url":"https://api.github.com/repos/appleseedhq/appleseed/stargazers","contributors_url":"https://api.github.com/repos/appleseedhq/appleseed/contributors","subscribers_url":"https://api.github.com/repos/appleseedhq/appleseed/subscribers","subscription_url":"https://api.github.com/repos/appleseedhq/appleseed/subscription","commits_url":"https://api.github.com/repos/appleseedhq/appleseed/commits{/sha}","git_commits_url":"https://api.github.com/repos/appleseedhq/appleseed/git/commits{/sha}","comments_url":"https://api.github.com/repos/appleseedhq/appleseed/comments{/number}","issue_comment_url":"https://api.github.com/repos/appleseedhq/appleseed/issues/comments{/number}","contents_url":"https://api.github.com/repos/appleseedhq/appleseed/contents/{+path}","compare_url":"https://api.github.com/repos/appleseedhq/appleseed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appleseedhq/appleseed/merges","archive_url":"https://api.github.com/repos/appleseedhq/appleseed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appleseedhq/appleseed/downloads","issues_url":"https://api.github.com/repos/appleseedhq/appleseed/issues{/number}","pulls_url":"https://api.github.com/repos/appleseedhq/appleseed/pulls{/number}","milestones_url":"https://api.github.com/repos/appleseedhq/appleseed/milestones{/number}","notifications_url":"https://api.github.com/repos/appleseedhq/appleseed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appleseedhq/appleseed/labels{/name}","releases_url":"https://api.github.com/repos/appleseedhq/appleseed/releases{/id}","created_at":"2010-07-02T16:33:51Z","updated_at":"2015-07-12T12:33:55Z","pushed_at":"2015-07-12T20:54:09Z","git_url":"git://github.com/appleseedhq/appleseed.git","ssh_url":"git@github.com:appleseedhq/appleseed.git","clone_url":"https://github.com/appleseedhq/appleseed.git","svn_url":"https://github.com/appleseedhq/appleseed","homepage":"http://appleseedhq.net/","size":601886,"stargazers_count":188,"watchers_count":188,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"open_issues_count":172,"forks":59,"open_issues":172,"watchers":188,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/appleseedhq/appleseed/pulls/780"},"html":{"href":"https://github.com/appleseedhq/appleseed/pull/780"},"issue":{"href":"https://api.github.com/repos/appleseedhq/appleseed/issues/780"},"comments":{"href":"https://api.github.com/repos/appleseedhq/appleseed/issues/780/comments"},"review_comments":{"href":"https://api.github.com/repos/appleseedhq/appleseed/pulls/780/comments"},"review_comment":{"href":"https://api.github.com/repos/appleseedhq/appleseed/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/appleseedhq/appleseed/pulls/780/commits"},"statuses":{"href":"https://api.github.com/repos/appleseedhq/appleseed/statuses/27b5419691cee35a16951215d276b1198254f963"}}}}