{"action":"created","comment":{"url":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments/23453776","id":23453776,"diff_hunk":"@@ -0,0 +1,55 @@\n+\n+#ifdef TANGRAM_VERTEX_LIGHTS\n+    #ifdef TANGRAM_MATERIAL_AMBIENT\n+        varying vec4 v_light_accumulator_ambient;\n+    #endif\n+    #ifdef TANGRAM_MATERIAL_DIFFUSE\n+        varying vec4 v_light_accumulator_diffuse;\n+    #endif\n+    #ifdef TANGRAM_MATERIAL_SPECULAR\n+        varying vec4 v_light_accumulator_specular;\n+    #endif\n+#endif\n+\n+void lightFragment(in vec3 _eyeToPoint, in vec3 _normal, inout vec4 _colorOut) {\n+\n+    #ifdef TANGRAM_VERTEX_LIGHTS\n+        #ifdef TANGRAM_MATERIAL_AMBIENT\n+            g_light_accumulator_ambient = v_light_accumulator_ambient;\n+        #endif\n+\n+        #ifdef TANGRAM_MATERIAL_DIFFUSE\n+            g_light_accumulator_diffuse = v_light_accumulator_diffuse;\n+        #endif\n+\n+        #ifdef TANGRAM_MATERIAL_SPECULAR\n+            g_light_accumulator_specular = v_light_accumulator_specular;\n+        #endif\n+    #endif\n+\n+    #pragma tangram: fragment_lights_to_compute\n+\n+    //  Final light intensity calculation\n+    //\n+    vec4 color = vec4(0.0);\n+  \n+    #ifdef TANGRAM_MATERIAL_EMISSION\n+        color = g_material.emission;\n+    #endif\n+\n+    #ifdef TANGRAM_MATERIAL_AMBIENT\n+        color += g_light_accumulator_ambient * g_material.ambient;\n+    #endif\n+\n+    #ifdef TANGRAM_MATERIAL_DIFFUSE\n+        color += g_light_accumulator_diffuse * g_material.diffuse;\n+    #endif\n+\n+    #ifdef TANGRAM_MATERIAL_SPECULAR\n+        color += g_light_accumulator_specular * g_material.specular;\n+    #endif\n+\n+    color = clamp(color, 0.0, 1.0);","path":"core/resources/lightFragment.glsl","position":52,"original_position":52,"commit_id":"306c7fbd11a63cfd3713bc780dd2fcd68743342d","original_commit_id":"306c7fbd11a63cfd3713bc780dd2fcd68743342d","user":{"login":"karimnaaji","id":7061573,"avatar_url":"https://avatars.githubusercontent.com/u/7061573?v=3","gravatar_id":"","url":"https://api.github.com/users/karimnaaji","html_url":"https://github.com/karimnaaji","followers_url":"https://api.github.com/users/karimnaaji/followers","following_url":"https://api.github.com/users/karimnaaji/following{/other_user}","gists_url":"https://api.github.com/users/karimnaaji/gists{/gist_id}","starred_url":"https://api.github.com/users/karimnaaji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karimnaaji/subscriptions","organizations_url":"https://api.github.com/users/karimnaaji/orgs","repos_url":"https://api.github.com/users/karimnaaji/repos","events_url":"https://api.github.com/users/karimnaaji/events{/privacy}","received_events_url":"https://api.github.com/users/karimnaaji/received_events","type":"User","site_admin":false},"body":"It's a nice idea to do that in a second pass! But POI icons and textures wouldn't probably need it since they won't be in linear space most of the time, so we'd probably need some separation, but for sure it gives more control on the overhaul pipeline. For now, I guess it's good to apply gamma correction on each shader, I know it's pretty tedious, but we need it only for fonts and lightning and we can move it when we'd have the post-process pipeline :)","created_at":"2015-01-23T14:55:42Z","updated_at":"2015-01-23T14:55:42Z","html_url":"https://github.com/tangrams/tangram-es/pull/31#discussion_r23453776","pull_request_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments/23453776"},"html":{"href":"https://github.com/tangrams/tangram-es/pull/31#discussion_r23453776"},"pull_request":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/tangrams/tangram-es/pulls/31","id":25976615,"html_url":"https://github.com/tangrams/tangram-es/pull/31","diff_url":"https://github.com/tangrams/tangram-es/pull/31.diff","patch_url":"https://github.com/tangrams/tangram-es/pull/31.patch","issue_url":"https://api.github.com/repos/tangrams/tangram-es/issues/31","number":31,"state":"open","locked":false,"title":"3 lights ( + material and shader injection) implemented and tested on ios, android and rasberrypi","user":{"login":"patriciogonzalezvivo","id":346914,"avatar_url":"https://avatars.githubusercontent.com/u/346914?v=3","gravatar_id":"","url":"https://api.github.com/users/patriciogonzalezvivo","html_url":"https://github.com/patriciogonzalezvivo","followers_url":"https://api.github.com/users/patriciogonzalezvivo/followers","following_url":"https://api.github.com/users/patriciogonzalezvivo/following{/other_user}","gists_url":"https://api.github.com/users/patriciogonzalezvivo/gists{/gist_id}","starred_url":"https://api.github.com/users/patriciogonzalezvivo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patriciogonzalezvivo/subscriptions","organizations_url":"https://api.github.com/users/patriciogonzalezvivo/orgs","repos_url":"https://api.github.com/users/patriciogonzalezvivo/repos","events_url":"https://api.github.com/users/patriciogonzalezvivo/events{/privacy}","received_events_url":"https://api.github.com/users/patriciogonzalezvivo/received_events","type":"User","site_admin":false},"body":"Lot of changes. Please review","created_at":"2014-12-12T14:29:34Z","updated_at":"2015-01-23T14:55:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"551ef82ac574f0654503b3abc4582ee38648ddc8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/31/commits","review_comments_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/31/comments","review_comment_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments/{number}","comments_url":"https://api.github.com/repos/tangrams/tangram-es/issues/31/comments","statuses_url":"https://api.github.com/repos/tangrams/tangram-es/statuses/306c7fbd11a63cfd3713bc780dd2fcd68743342d","head":{"label":"tangrams:lights","ref":"lights","sha":"306c7fbd11a63cfd3713bc780dd2fcd68743342d","user":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"repo":{"id":23391501,"name":"tangram-es","full_name":"tangrams/tangram-es","owner":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tangrams/tangram-es","description":"OpenGL ES version of Tangram for mobile devices - EARLY work-in-progress!","fork":false,"url":"https://api.github.com/repos/tangrams/tangram-es","forks_url":"https://api.github.com/repos/tangrams/tangram-es/forks","keys_url":"https://api.github.com/repos/tangrams/tangram-es/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tangrams/tangram-es/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tangrams/tangram-es/teams","hooks_url":"https://api.github.com/repos/tangrams/tangram-es/hooks","issue_events_url":"https://api.github.com/repos/tangrams/tangram-es/issues/events{/number}","events_url":"https://api.github.com/repos/tangrams/tangram-es/events","assignees_url":"https://api.github.com/repos/tangrams/tangram-es/assignees{/user}","branches_url":"https://api.github.com/repos/tangrams/tangram-es/branches{/branch}","tags_url":"https://api.github.com/repos/tangrams/tangram-es/tags","blobs_url":"https://api.github.com/repos/tangrams/tangram-es/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tangrams/tangram-es/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tangrams/tangram-es/git/refs{/sha}","trees_url":"https://api.github.com/repos/tangrams/tangram-es/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tangrams/tangram-es/statuses/{sha}","languages_url":"https://api.github.com/repos/tangrams/tangram-es/languages","stargazers_url":"https://api.github.com/repos/tangrams/tangram-es/stargazers","contributors_url":"https://api.github.com/repos/tangrams/tangram-es/contributors","subscribers_url":"https://api.github.com/repos/tangrams/tangram-es/subscribers","subscription_url":"https://api.github.com/repos/tangrams/tangram-es/subscription","commits_url":"https://api.github.com/repos/tangrams/tangram-es/commits{/sha}","git_commits_url":"https://api.github.com/repos/tangrams/tangram-es/git/commits{/sha}","comments_url":"https://api.github.com/repos/tangrams/tangram-es/comments{/number}","issue_comment_url":"https://api.github.com/repos/tangrams/tangram-es/issues/comments/{number}","contents_url":"https://api.github.com/repos/tangrams/tangram-es/contents/{+path}","compare_url":"https://api.github.com/repos/tangrams/tangram-es/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tangrams/tangram-es/merges","archive_url":"https://api.github.com/repos/tangrams/tangram-es/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tangrams/tangram-es/downloads","issues_url":"https://api.github.com/repos/tangrams/tangram-es/issues{/number}","pulls_url":"https://api.github.com/repos/tangrams/tangram-es/pulls{/number}","milestones_url":"https://api.github.com/repos/tangrams/tangram-es/milestones{/number}","notifications_url":"https://api.github.com/repos/tangrams/tangram-es/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tangrams/tangram-es/labels{/name}","releases_url":"https://api.github.com/repos/tangrams/tangram-es/releases{/id}","created_at":"2014-08-27T13:56:56Z","updated_at":"2015-01-21T19:28:34Z","pushed_at":"2015-01-22T23:05:59Z","git_url":"git://github.com/tangrams/tangram-es.git","ssh_url":"git@github.com:tangrams/tangram-es.git","clone_url":"https://github.com/tangrams/tangram-es.git","svn_url":"https://github.com/tangrams/tangram-es","homepage":"","size":18793,"stargazers_count":11,"watchers_count":11,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":11,"default_branch":"master"}},"base":{"label":"tangrams:master","ref":"master","sha":"f6885d87e3455ecb5a42c711dccd04bcbbfc888b","user":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"repo":{"id":23391501,"name":"tangram-es","full_name":"tangrams/tangram-es","owner":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tangrams/tangram-es","description":"OpenGL ES version of Tangram for mobile devices - EARLY work-in-progress!","fork":false,"url":"https://api.github.com/repos/tangrams/tangram-es","forks_url":"https://api.github.com/repos/tangrams/tangram-es/forks","keys_url":"https://api.github.com/repos/tangrams/tangram-es/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tangrams/tangram-es/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tangrams/tangram-es/teams","hooks_url":"https://api.github.com/repos/tangrams/tangram-es/hooks","issue_events_url":"https://api.github.com/repos/tangrams/tangram-es/issues/events{/number}","events_url":"https://api.github.com/repos/tangrams/tangram-es/events","assignees_url":"https://api.github.com/repos/tangrams/tangram-es/assignees{/user}","branches_url":"https://api.github.com/repos/tangrams/tangram-es/branches{/branch}","tags_url":"https://api.github.com/repos/tangrams/tangram-es/tags","blobs_url":"https://api.github.com/repos/tangrams/tangram-es/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tangrams/tangram-es/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tangrams/tangram-es/git/refs{/sha}","trees_url":"https://api.github.com/repos/tangrams/tangram-es/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tangrams/tangram-es/statuses/{sha}","languages_url":"https://api.github.com/repos/tangrams/tangram-es/languages","stargazers_url":"https://api.github.com/repos/tangrams/tangram-es/stargazers","contributors_url":"https://api.github.com/repos/tangrams/tangram-es/contributors","subscribers_url":"https://api.github.com/repos/tangrams/tangram-es/subscribers","subscription_url":"https://api.github.com/repos/tangrams/tangram-es/subscription","commits_url":"https://api.github.com/repos/tangrams/tangram-es/commits{/sha}","git_commits_url":"https://api.github.com/repos/tangrams/tangram-es/git/commits{/sha}","comments_url":"https://api.github.com/repos/tangrams/tangram-es/comments{/number}","issue_comment_url":"https://api.github.com/repos/tangrams/tangram-es/issues/comments/{number}","contents_url":"https://api.github.com/repos/tangrams/tangram-es/contents/{+path}","compare_url":"https://api.github.com/repos/tangrams/tangram-es/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tangrams/tangram-es/merges","archive_url":"https://api.github.com/repos/tangrams/tangram-es/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tangrams/tangram-es/downloads","issues_url":"https://api.github.com/repos/tangrams/tangram-es/issues{/number}","pulls_url":"https://api.github.com/repos/tangrams/tangram-es/pulls{/number}","milestones_url":"https://api.github.com/repos/tangrams/tangram-es/milestones{/number}","notifications_url":"https://api.github.com/repos/tangrams/tangram-es/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tangrams/tangram-es/labels{/name}","releases_url":"https://api.github.com/repos/tangrams/tangram-es/releases{/id}","created_at":"2014-08-27T13:56:56Z","updated_at":"2015-01-21T19:28:34Z","pushed_at":"2015-01-22T23:05:59Z","git_url":"git://github.com/tangrams/tangram-es.git","ssh_url":"git@github.com:tangrams/tangram-es.git","clone_url":"https://github.com/tangrams/tangram-es.git","svn_url":"https://github.com/tangrams/tangram-es","homepage":"","size":18793,"stargazers_count":11,"watchers_count":11,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/31"},"html":{"href":"https://github.com/tangrams/tangram-es/pull/31"},"issue":{"href":"https://api.github.com/repos/tangrams/tangram-es/issues/31"},"comments":{"href":"https://api.github.com/repos/tangrams/tangram-es/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/tangrams/tangram-es/statuses/306c7fbd11a63cfd3713bc780dd2fcd68743342d"}}}}