{"id":699,"date":"2013-05-31T02:45:18","date_gmt":"2013-05-31T02:45:18","guid":{"rendered":"http:\/\/lousodrome.net\/blog\/light\/?p=699"},"modified":"2013-05-31T02:45:18","modified_gmt":"2013-05-31T02:45:18","slug":"the-effect-of-quantization-in-gamma-space-and-linear-space","status":"publish","type":"post","link":"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/","title":{"rendered":"The effect of quantization in gamma space and linear space"},"content":{"rendered":"<p>I mentioned already (<a href=\"http:\/\/lousodrome.net\/blog\/light\/2012\/09\/11\/readings-on-color-management\/\">here <\/a>and <a href=\"http:\/\/lousodrome.net\/blog\/light\/2013\/05\/26\/gamma-correct-and-hdr-rendering-in-a-32-bits-buffer\/\">here<\/a>) that one problem with gamma correct rendering is how we lose prevision for small values, and may run out of it if we didn&#8217;t have enough of it. I wrote a quick shader to demonstrate this problem and see how severe it is depending on the number of bits.<\/p>\n<p>Thanks to <a href=\"http:\/\/www.beautypi.com\/\">BeautyPi<\/a>&#8216;s fantastic tool, <a href=\"http:\/\/www.shadertoy.com\/\">ShaderToy<\/a>, I could put it on line. Here is the live demo with an absurdly low precision format (R5G6B5) so you cannot miss the banding; just press the play button. It displays colors with maximum and low precision, in linear space and gamma space. The lighter vertical line shows the 50% intensity position. You can <a href=\"https:\/\/www.shadertoy.com\/view\/XdX3D4\">see the shader and play with the values here<\/a>.<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.shadertoy.com\/embed\/XdX3D4\" height=\"375\" width=\"500\" allowfullscreen=\"\" frameborder=\"0\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I mentioned already (here and here) that one problem with gamma correct rendering is how we lose prevision for small values, and may run out of it if we didn&#8217;t have enough of it. I wrote a quick shader to &hellip; <a href=\"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17],"tags":[214,194,397,198,399,288,199,398],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.13 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>The effect of quantization in gamma space and linear space &ndash; Light is beautiful<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The effect of quantization in gamma space and linear space &ndash; Light is beautiful\" \/>\n<meta property=\"og:description\" content=\"I mentioned already (here and here) that one problem with gamma correct rendering is how we lose prevision for small values, and may run out of it if we didn&#8217;t have enough of it. I wrote a quick shader to &hellip; Continue reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/\" \/>\n<meta property=\"og:site_name\" content=\"Light is beautiful\" \/>\n<meta property=\"article:published_time\" content=\"2013-05-31T02:45:18+00:00\" \/>\n<meta name=\"author\" content=\"Julien Guertault\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Zavie\" \/>\n<meta name=\"twitter:site\" content=\"@Zavie\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Julien Guertault\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/\"},\"author\":{\"name\":\"Julien Guertault\",\"@id\":\"https:\/\/lousodrome.net\/blog\/light\/#\/schema\/person\/a16a2a69d73eca763ffdf125c49eaa2f\"},\"headline\":\"The effect of quantization in gamma space and linear space\",\"datePublished\":\"2013-05-31T02:45:18+00:00\",\"dateModified\":\"2013-05-31T02:45:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/\"},\"wordCount\":135,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/lousodrome.net\/blog\/light\/#\/schema\/person\/a16a2a69d73eca763ffdf125c49eaa2f\"},\"keywords\":[\"BeautyPi\",\"gamma correction\",\"gamma space\",\"linear space\",\"live demo\",\"precision\",\"quantization\",\"shader\"],\"articleSection\":[\"Rendering\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/\",\"url\":\"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/\",\"name\":\"The effect of quantization in gamma space and linear space &ndash; Light is beautiful\",\"isPartOf\":{\"@id\":\"https:\/\/lousodrome.net\/blog\/light\/#website\"},\"datePublished\":\"2013-05-31T02:45:18+00:00\",\"dateModified\":\"2013-05-31T02:45:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/lousodrome.net\/blog\/light\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The effect of quantization in gamma space and linear space\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/lousodrome.net\/blog\/light\/#website\",\"url\":\"https:\/\/lousodrome.net\/blog\/light\/\",\"name\":\"Light is beautiful\",\"description\":\"Thoughts of a graphics programmer, demoscener and spare time photographer\",\"publisher\":{\"@id\":\"https:\/\/lousodrome.net\/blog\/light\/#\/schema\/person\/a16a2a69d73eca763ffdf125c49eaa2f\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/lousodrome.net\/blog\/light\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/lousodrome.net\/blog\/light\/#\/schema\/person\/a16a2a69d73eca763ffdf125c49eaa2f\",\"name\":\"Julien Guertault\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lousodrome.net\/blog\/light\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2e5fc7a18e1701e1bb61a5da0ef35cf7?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2e5fc7a18e1701e1bb61a5da0ef35cf7?s=96&d=identicon&r=g\",\"caption\":\"Julien Guertault\"},\"logo\":{\"@id\":\"https:\/\/lousodrome.net\/blog\/light\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/lousodrome.net\/blog\/light\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The effect of quantization in gamma space and linear space &ndash; Light is beautiful","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/","og_locale":"en_US","og_type":"article","og_title":"The effect of quantization in gamma space and linear space &ndash; Light is beautiful","og_description":"I mentioned already (here and here) that one problem with gamma correct rendering is how we lose prevision for small values, and may run out of it if we didn&#8217;t have enough of it. I wrote a quick shader to &hellip; Continue reading &rarr;","og_url":"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/","og_site_name":"Light is beautiful","article_published_time":"2013-05-31T02:45:18+00:00","author":"Julien Guertault","twitter_card":"summary_large_image","twitter_creator":"@Zavie","twitter_site":"@Zavie","twitter_misc":{"Written by":"Julien Guertault","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/#article","isPartOf":{"@id":"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/"},"author":{"name":"Julien Guertault","@id":"https:\/\/lousodrome.net\/blog\/light\/#\/schema\/person\/a16a2a69d73eca763ffdf125c49eaa2f"},"headline":"The effect of quantization in gamma space and linear space","datePublished":"2013-05-31T02:45:18+00:00","dateModified":"2013-05-31T02:45:18+00:00","mainEntityOfPage":{"@id":"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/"},"wordCount":135,"commentCount":0,"publisher":{"@id":"https:\/\/lousodrome.net\/blog\/light\/#\/schema\/person\/a16a2a69d73eca763ffdf125c49eaa2f"},"keywords":["BeautyPi","gamma correction","gamma space","linear space","live demo","precision","quantization","shader"],"articleSection":["Rendering"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/","url":"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/","name":"The effect of quantization in gamma space and linear space &ndash; Light is beautiful","isPartOf":{"@id":"https:\/\/lousodrome.net\/blog\/light\/#website"},"datePublished":"2013-05-31T02:45:18+00:00","dateModified":"2013-05-31T02:45:18+00:00","breadcrumb":{"@id":"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/lousodrome.net\/blog\/light\/2013\/05\/31\/the-effect-of-quantization-in-gamma-space-and-linear-space\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/lousodrome.net\/blog\/light\/"},{"@type":"ListItem","position":2,"name":"The effect of quantization in gamma space and linear space"}]},{"@type":"WebSite","@id":"https:\/\/lousodrome.net\/blog\/light\/#website","url":"https:\/\/lousodrome.net\/blog\/light\/","name":"Light is beautiful","description":"Thoughts of a graphics programmer, demoscener and spare time photographer","publisher":{"@id":"https:\/\/lousodrome.net\/blog\/light\/#\/schema\/person\/a16a2a69d73eca763ffdf125c49eaa2f"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/lousodrome.net\/blog\/light\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/lousodrome.net\/blog\/light\/#\/schema\/person\/a16a2a69d73eca763ffdf125c49eaa2f","name":"Julien Guertault","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lousodrome.net\/blog\/light\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2e5fc7a18e1701e1bb61a5da0ef35cf7?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2e5fc7a18e1701e1bb61a5da0ef35cf7?s=96&d=identicon&r=g","caption":"Julien Guertault"},"logo":{"@id":"https:\/\/lousodrome.net\/blog\/light\/#\/schema\/person\/image\/"},"url":"https:\/\/lousodrome.net\/blog\/light\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/lousodrome.net\/blog\/light\/wp-json\/wp\/v2\/posts\/699"}],"collection":[{"href":"https:\/\/lousodrome.net\/blog\/light\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lousodrome.net\/blog\/light\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lousodrome.net\/blog\/light\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lousodrome.net\/blog\/light\/wp-json\/wp\/v2\/comments?post=699"}],"version-history":[{"count":0,"href":"https:\/\/lousodrome.net\/blog\/light\/wp-json\/wp\/v2\/posts\/699\/revisions"}],"wp:attachment":[{"href":"https:\/\/lousodrome.net\/blog\/light\/wp-json\/wp\/v2\/media?parent=699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lousodrome.net\/blog\/light\/wp-json\/wp\/v2\/categories?post=699"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lousodrome.net\/blog\/light\/wp-json\/wp\/v2\/tags?post=699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}