{"action":"created","issue":{"url":"https://api.github.com/repos/highfidelity/hifi/issues/7752","repository_url":"https://api.github.com/repos/highfidelity/hifi","labels_url":"https://api.github.com/repos/highfidelity/hifi/issues/7752/labels{/name}","comments_url":"https://api.github.com/repos/highfidelity/hifi/issues/7752/comments","events_url":"https://api.github.com/repos/highfidelity/hifi/issues/7752/events","html_url":"https://github.com/highfidelity/hifi/pull/7752","id":150764989,"number":7752,"title":"DO NOT MERGE: Correction To sRGB Conversions","user":{"login":"Geenz","id":341813,"avatar_url":"https://avatars.githubusercontent.com/u/341813?v=3","gravatar_id":"","url":"https://api.github.com/users/Geenz","html_url":"https://github.com/Geenz","followers_url":"https://api.github.com/users/Geenz/followers","following_url":"https://api.github.com/users/Geenz/following{/other_user}","gists_url":"https://api.github.com/users/Geenz/gists{/gist_id}","starred_url":"https://api.github.com/users/Geenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Geenz/subscriptions","organizations_url":"https://api.github.com/users/Geenz/orgs","repos_url":"https://api.github.com/users/Geenz/repos","events_url":"https://api.github.com/users/Geenz/events{/privacy}","received_events_url":"https://api.github.com/users/Geenz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/highfidelity/hifi/labels/DO%20NOT%20MERGE","name":"DO NOT MERGE","color":"e11d21"},{"url":"https://api.github.com/repos/highfidelity/hifi/labels/QA%20Ready","name":"QA Ready","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2016-04-25T06:43:30Z","updated_at":"2016-04-26T22:28:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/7752","html_url":"https://github.com/highfidelity/hifi/pull/7752","diff_url":"https://github.com/highfidelity/hifi/pull/7752.diff","patch_url":"https://github.com/highfidelity/hifi/pull/7752.patch"},"body":"Just pulling off of experiences in creating linearly correct rendering pipelines here - a gamma curve of 2.2 is actually not quite sRGB.  The reality is, 2.2 is _approximate_ of sRGB's _piecewise_ gamma curve, meaning that pow(color, 2.2) and pow(color, 1.0/2.2) isn't quite right.\r\n\r\nThe OpenGL specification actually has some conversion tables available that show how to convert from sRGB to linear, and back again from linear to sRGB.\r\n\r\nThe relevant sections are 8.24 for sRGB -> Linear, and 17.3.9 for Linear -> sRGB in the OpenGL specification."},"comment":{"url":"https://api.github.com/repos/highfidelity/hifi/issues/comments/214906971","html_url":"https://github.com/highfidelity/hifi/pull/7752#issuecomment-214906971","issue_url":"https://api.github.com/repos/highfidelity/hifi/issues/7752","id":214906971,"user":{"login":"Geenz","id":341813,"avatar_url":"https://avatars.githubusercontent.com/u/341813?v=3","gravatar_id":"","url":"https://api.github.com/users/Geenz","html_url":"https://github.com/Geenz","followers_url":"https://api.github.com/users/Geenz/followers","following_url":"https://api.github.com/users/Geenz/following{/other_user}","gists_url":"https://api.github.com/users/Geenz/gists{/gist_id}","starred_url":"https://api.github.com/users/Geenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Geenz/subscriptions","organizations_url":"https://api.github.com/users/Geenz/orgs","repos_url":"https://api.github.com/users/Geenz/repos","events_url":"https://api.github.com/users/Geenz/events{/privacy}","received_events_url":"https://api.github.com/users/Geenz/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T22:28:42Z","updated_at":"2016-04-26T22:28:42Z","body":"Here's some comparisons on the Mac Pro, and the MacBook Pro:\r\nMac Pro w/AMD FirePro D700 6GB:\r\nPlaya sRGB:\r\n![srgb](https://cloud.githubusercontent.com/assets/341813/14835605/8dcc576e-0bd8-11e6-9d28-29038d17a353.png)\r\nPlaya Gamma 2.2:\r\n![gamma 22](https://cloud.githubusercontent.com/assets/341813/14835611/99498ed6-0bd8-11e6-80a8-70f3df0ef962.png)\r\nPlaya Difference overlaid:\r\n![srgb difference](https://cloud.githubusercontent.com/assets/341813/14835602/86975868-0bd8-11e6-97e5-912d22ed67fc.png)\r\n\r\nMacBook Pro w/AMD Radeon R9 M370X 2GB:\r\n\r\nPlaya sRGB:\r\n<img width=\"1792\" alt=\"macbook pro srgb\" src=\"https://cloud.githubusercontent.com/assets/341813/14836231/9ddad7c6-0bdc-11e6-91e4-32535094d88f.png\">\r\n\r\nPlaya Gamma 2.2:\r\n<img width=\"1792\" alt=\"macbook pro gamma 22\" src=\"https://cloud.githubusercontent.com/assets/341813/14836245/ab24ff9c-0bdc-11e6-8334-4e328c337b34.png\">\r\n\r\nPlaya Difference overlaid:\r\n<img width=\"1792\" alt=\"macbook pro comparison\" src=\"https://cloud.githubusercontent.com/assets/341813/14836215/871e31c2-0bdc-11e6-9350-29c7b39f69b3.png\">\r\n"}}