{"id":435,"date":"2013-08-14T06:45:16","date_gmt":"2013-08-14T06:45:16","guid":{"rendered":"http:\/\/yoonhada.com\/wp\/?p=435"},"modified":"2013-08-14T06:45:16","modified_gmt":"2013-08-14T06:45:16","slug":"rendering-in-linear-color-space","status":"publish","type":"post","link":"http:\/\/yoonhada.com\/?p=435","title":{"rendered":"Rendering in Linear Color Space"},"content":{"rendered":"<p>\t\t\t\t<a href=\"http:\/\/juhlnet.egloos.com\/m\/1960058\">http:\/\/juhlnet.egloos.com\/m\/1960058<\/a><\/p>\n<p># sRGB \uceec\ub7ec \uacf5\uac04<\/p>\n<div><\/div>\n<div><a href=\"http:\/\/yoonhada.com\/wp\/wp-content\/uploads\/2013\/08\/a0008416_4add15a95c626.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-437\" alt=\"a0008416_4add15a95c626\" src=\"http:\/\/yoonhada.com\/wp\/wp-content\/uploads\/2013\/08\/a0008416_4add15a95c626.png\" width=\"180\" height=\"180\" \/><\/a><\/div>\n<div><\/div>\n<div>\n<div>\uc6b0\ub9ac\uac00 \uc0ac\uc6a9\ud558\ub294 \ub300\ubd80\ubd84\uc758 \ub514\uc9c0\ud138 \uc774\ubbf8\uc9c0 \uc7a5\ube44\ub4e4(\ub514\uce74, \uc2a4\uce90\ub108, \ubaa8\ub2c8\ud130, \ud504\ub9b0\ud130) \uc740 \ud45c\uc900 non-linear \uc0c9 \uacf5\uac04\uc778 sRGB \ub97c<\/div>\n<div>\uc0ac\uc6a9\ud558\ub3c4\ub85d \uc815\ud574\uc838\uc788\ub2e4. \ub530\ub77c\uc11c \uc0ac\uc9c4\uc774\ub098 \uadf8\ub9bc\ud30c\uc77c\ub4e4\ub3c4 \uadf8\uc5d0 \ub9de\ucd94\uc5b4\uc9c4 \ud615\ud0dc\ub85c \uc800\uc7a5\ub41c\ub2e4.<\/div>\n<\/div>\n<div>\n<div><\/div>\n<div>\ubcf4\ud1b5 \uc774\ubbf8\uc9c0\ub97c \ud569\uc131(\ud544\ud130\ub9c1, \ube14\ub80c\ub529, \uc250\uc774\ub529,..) \ud560\ub54c \uc6b0\ub9ac\ub294 \uc0c9\uacf5\uac04\uc774 linear \ud558\ub2e4\uace0 \uc0dd\uac01\ud558\uc9c0\ub9cc, \uc2e4\uc81c \uc800\uc7a5\ub41c \ud30c\uc77c\uc740<\/div>\n<div>sRGB \uc5d0 \ub9de\ucdb0\uc838 \uc788\uae30 \ub54c\ubb38\uc5d0 \uc5f0\uc0b0 \uc804\uc5d0 \uba3c\uc800 linearize \ud574\uc918\uc57c\u00a0\uc815\ud655\ud55c \uceec\ub7ec \uc5f0\uc0b0\uc774 \uac00\ub2a5\ud574\uc9c4\ub2e4\uace0 \ud560 \uc218 \uc788\ub2e4. \ubaa8\ub2c8\ud130 \uc5ed\uc2dc<\/div>\n<div>sRGB \uc5d0 \ub9de\ucdb0\uc838\u00a0\uc788\uae30 \ub54c\ubb38\uc5d0 \uc5f0\uc0b0 \ud6c4 sRGB \uc0c9\uacf5\uac04\uc73c\ub85c \ubcc0\ud658\ud574\uc918\uc57c \ud55c\ub2e4.<\/div>\n<div><\/div>\n<div>\ubcc0\ud658 \uc218\uc2dd\uc740 \uc544\ub798\uc640 \uac19\ub2e4. (gamma 2.2 \uc5d0 \uadfc\uc811)<\/div>\n<div>\n<p>[latex]\\begin{bmatrix}<br \/>\nR_\\mathrm{linear}\\\\G_\\mathrm{linear}\\\\B_\\mathrm{linear}\\end{bmatrix}=<br \/>\n\\begin{bmatrix}<br \/>\n3.2406&amp;-1.5372&amp;-0.4986\\\\<br \/>\n-0.9689&amp;1.8758&amp;0.0415\\\\<br \/>\n0.0557&amp;-0.2040&amp;1.0570<br \/>\n\\end{bmatrix}<br \/>\n\\begin{bmatrix}<br \/>\nX \\\\<br \/>\nY \\\\<br \/>\nZ \\end{bmatrix}[\/latex]<br \/>\n[latex]C_\\mathrm{srgb}=\\begin{cases}<br \/>\n12.92C_\\mathrm{linear}, &amp; C_\\mathrm{linear} \\le 0.0031308\\\\<br \/>\n(1+a)C_\\mathrm{linear}^{1\/2.4}-a, &amp; C_\\mathrm{linear} &gt; 0.0031308<br \/>\n\\end{cases}<br \/>\n[\/latex]*where [latex]a = 0.055[\/latex]<\/p>\n<div><\/div>\n<p>[latex]C_\\mathrm{linear}=\\begin{cases}\\frac{C_\\mathrm{srgb}}{12.92}, &amp; C_\\mathrm{srgb}\\le0.04045\\\\<br \/>\n\\left(\\frac{C_\\mathrm{srgb}+a}{1+a}\\right)^{2.4}, &amp; C_\\mathrm{srgb}&gt;0.04045<br \/>\n\\end{cases}<br \/>\n[\/latex]<br \/>\n[latex]\\begin{bmatrix}<\/p>\n<p>X\\\\Y\\\\Z\\end{bmatrix}=<br \/>\n\\begin{bmatrix}<br \/>\n0.4124&amp;0.3576&amp;0.1805\\\\<br \/>\n0.2126&amp;0.7152&amp;0.0722\\\\<br \/>\n0.0193&amp;0.1192&amp;0.9505<br \/>\n\\end{bmatrix}<br \/>\n\\begin{bmatrix}<br \/>\nR_\\mathrm{linear}\\\\<br \/>\nG_\\mathrm{linear}\\\\<br \/>\nB_\\mathrm{linear}\\end{bmatrix}<br \/>\n[\/latex]<\/p>\n<\/div>\n<div>\ub300\ubd80\ubd84\uc758 \uc774\ubbf8\uc9c0 \ud504\ub85c\uc138\uc2f1 \uc720\ud2f8\ub9ac\ud2f0\ub098 \uac8c\uc784\ub4e4\uc740 \uc774\ub97c \ubb34\uc2dc\ud558\uace0 \uad6c\ud604\ud558\uace0 \uc788\ub2e4. \uc790\uc2e0\uc774 \uc791\uc5c5\ud55c \ud14d\uc2a4\uccd0\uac00 \uc2e4\uc81c \uc5d4\uc9c4\uc5d0\uc11c<\/div>\n<div>(\ud3ec\uc2a4\ud2b8 \ud504\ub85c\uc138\uc2f1 \ub044\uace0) \uc660\uc9c0 \ubaa8\ub974\uac8c \uce59\uce59\ud558\uace0 \uc5b4\ub461\uac8c \ub290\uaef4\uc9c4\ub2e4\uba74?&#8230; 100% \uc784\ub2e4 -_-;<\/div>\n<div><\/div>\n<\/div>\n<div><\/div>\n<div># sRGB \uc77d\uae30<\/div>\n<div><\/div>\n<div>\ud14d\uc140\uc744 fetch \ud560 \ub54c sRGB -&gt; linear \ubcc0\ud658<\/div>\n<div><\/div>\n<div>DX10 \uce74\ub4dc\uc5d0\uc11c\ub294 \ud14d\uc2a4\uccd0\ub97c GPU \ucabd\uc73c\ub85c \ub85c\ub529\ud560\ub54c linear space \ub85c \uc790\ub3d9 \ubcc0\ud658\ub418\uac8c \ud560 \uc218 \uc788\ub2e4. \u00a0(\ubcc0\ud658\ub420 \ub54c \uc0c9 \uc190\uc2e4\uc744\u00a0\ub9c9\uae30<\/div>\n<div>\uc704\ud574\u00a0\ucc44\ub110 \ub2f9\u00a08bit \uc774\ubbf8\uc9c0\uac00 \ub0b4\ubd80\uc801\uc73c\ub85c 12bit \ub098 16bit \ub85c \uc800\uc7a5\ub41c\ub2e4\uace0 \ud55c\ub2e4) &#8211; \ub85c\ub529 \ud0c0\uc784\uc5d0 \ubcc0\ud658\ub418\ubbc0\ub85c \ud14d\uc2a4\uccd0 \ud544\ud130\ub9c1\ub3c4<\/div>\n<div>linear space \uc5d0\uc11c\u00a0\ud558\uac8c \ub41c\ub2e4.<\/div>\n<div><\/div>\n<div>DX9 \uce74\ub4dc\uc5d0\uc11c\ub3c4 \uc9c0\uc6d0\ud558\uc9c0\ub9cc \ub85c\ub529 \ud0c0\uc784\uc774 \uc544\ub2cc \uc250\uc774\ub354\uc5d0\uc11c \ud14d\uc140\uc744 fetch \ud560\ub54c linear space \ub85c \ubcc0\ud658\ub418\uac8c \ub41c\ub2e4. &#8211;<\/div>\n<div>\ud544\ud130\ub9c1\uc740 non-linear\u00a0space \uc5d0\uc11c\u00a0\ud558\uac8c \ub418\ubbc0\ub85c\u00a0\ubbf8\ubb18\ud558\uac8c \uc0c9\uc774 \ubcc0\ud558\uac8c \ub41c\ub2e4.<\/div>\n<div><\/div>\n<div>\n<div>\uc8fc\uc758. \uceec\ub7ec \uc774\ubbf8\uc9c0 \uc678\uc5d0 \uc120\ud615\uc801\uc778 \ub370\uc774\ud130(\ub178\uba40\ub9f5, \uc2a4\ud398\ud058\ub7ec\ub9f5, \ud558\uc774\ud2b8\ub9f5,&#8230;) \ub4e4\uc740 \uc774\ubbf8 linear space \uc5d0 \uc788\uae30 \ub54c\ubb38\uc5d0<\/div>\n<div>\ub530\ub85c \ucc98\ub9ac\ud560 \ud544\uc694\ub294 \uc5c6\ub2e4. &#8211; \uc0dd\uac01\ud574\ubcf4\ub2c8 \uc2a4\ud398\ud058\ub7ec\ub9f5\uc774 linear data \ub77c\uace0\ub294 \ud560 \uc218 \uc5c6\uaca0\ub2e4..<\/div>\n<div><\/div>\n<div><\/div>\n<\/div>\n<div># sRGB \uc4f0\uae30 &amp; \ube14\ub80c\ub529 \uc4f0\uae30<\/div>\n<div><\/div>\n<div>\ud504\ub808\uc784 \ubc84\ud37c\uc5d0 write \ud560 \ub54c linear -&gt; sRGB \ubcc0\ud658<\/div>\n<div>\ube14\ub80c\ub529 \ubaa8\ub4dc\ub77c\uba74 \ud504\ub808\uc784 \ubc84\ud37c\uc5d0\uc11c src \ub97c \uac00\uc838\uc62c\ub54c sRGB -&gt; linear \ubcc0\ud658\ud55c \uacb0\uacfc\ub97c \ube14\ub80c\ub529 \ud6c4 \ub2e4\uc2dc sRGB \ub85c \ubcc0\ud658<\/div>\n<div><\/div>\n<div>DX10 \uc774\uc0c1\uc758 \uce74\ub4dc\uc5d0\uc11c \ud558\ub4dc\uc6e8\uc5b4\uc801\uc73c\ub85c \uc9c0\uc6d0\ud55c\ub2e4.<\/div>\n<div><\/div>\n<div>\uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294\ub2e4\uba74 \ud53d\uc140 \uc250\uc774\ub354\uc5d0\uc11c \uc9c1\uc811 \ucc98\ub9ac\ud574 \uc904 \uc218 \uc788\ub2e4. &#8211; \ud558\uc9c0\ub9cc \ube14\ub80c\ub529 \ud560\ub54c \uc815\ud655\ud55c \uc5f0\uc0b0\uc774 \uc774\ub8e8\uc5b4\uc9c0\uc9c0 \uc54a\ub294\ub2e4.<\/div>\n<div>(\uba3c\uc800 sRGB \ud504\ub808\uc784 \ubc84\ud37c\ub97c \uc77d\uc5b4\uc640\uc11c linearize \ud574\uc57c \ud558\ubbc0\ub85c..)<\/div>\n<div><\/div>\n<div>\uc8fc\uc758. \uc911\uac04 \ub2e8\uacc4 \ub9f5 (\uad74\uc808\ub9f5, \ubc18\uc0ac\ub9f5, \uac70\uc6b8\ub9f5, &#8230;) \ub4e4\uc740 \ub2e4\uc2dc linear space \uc5d0\uc11c \uc0ac\uc6a9\ub420 \uac83\uc774\ubbc0\ub85c linearity \ub97c \uc720\uc9c0 \ud55c\ub2e4.<\/div>\n<div><\/div>\n<div><\/div>\n<div>\n<div># \uc801\uc6a9<\/div>\n<div><\/div>\n<div>\uccab\ubc88\uc9f8 \uc2a4\ud06c\ub9b0\uc0f7\uc774 linear space \uc250\uc774\ub529, \ub450\ubc88\uc9f8\uac00 \uc77c\ubc18\uc801\uc778 non-linear space \uc250\uc774\ub529<\/div>\n<div>\uccab\ubc88\uc9f8 \uc2a4\ud06c\ub9b0\uc0f7 \ubcf4\ub2e4 \ub450\ubc88\uc9f8 \uc2a4\ud06c\ub9b0\uc0f7\uc758 \ud14d\uc2a4\uccd0\uac00 \uc880 \ub354 \uce59\uce59\ud558\uace0 \uc5b4\ub461\uac8c \ub098\uc624\uace0, \uc2a4\ud399\ud058\ub7ec \ud558\uc774\ub77c\uc774\ud2b8 \ubd80\ubd84\uc740 \ub354 \uac15\ub82c\ud558\uac8c<\/div>\n<div>\ub098\uc628\ub2e4. \ub77c\uc774\ud2b8 \uc138\uae30\ub97c \ubc1d\uac8c\ud560 \uc218\ub85d \ub354 \ud655\uc5f0\ud558\uac8c \ucc28\uc774\uac00 \ub098\ub294 \uac78 \ubcfc \uc218 \uc788\uc5c8\ub2e4.<\/div>\n<div><\/div>\n<div><img decoding=\"async\" alt=\"1024\" src=\"http:\/\/pds15.egloos.com\/pds\/200910\/21\/16\/a0008416_4adde09c7f4d6.jpg\" width=\"1024\" border=\"0\" \/><\/div>\n<div><\/div>\n<div><img decoding=\"async\" alt=\"1024\" src=\"http:\/\/pds15.egloos.com\/pds\/200910\/21\/16\/a0008416_4adde0ad43035.jpg\" width=\"1024\" border=\"0\" \/><\/div>\n<\/div>\n<div><\/div>\n<div>\uc6d0\ubcf8 \ub514\ud4e8\uc988 \ud14d\uc2a4\uccd0<\/div>\n<div><img decoding=\"async\" alt=\"512\" src=\"http:\/\/pds15.egloos.com\/pds\/200910\/21\/16\/a0008416_4adea8ad82ad5.gif\" width=\"512\" border=\"0\" \/><\/div>\n<div><\/div>\n<p>\ucc38\uace0 \uc790\ub8cc:<\/p>\n<div><a href=\"http:\/\/en.wikipedia.org\/wiki\/SRGB\">http:\/\/en.wikipedia.org\/wiki\/SRGB<\/a><\/p>\n<div>GPU Gems 3. Chapter 24 : The Importance of Being Linear<\/div>\n<div><a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ee418639(VS.85).aspx\">http:\/\/msdn.microsoft.com\/en-us\/library\/ee418639(VS.85).aspx<\/a><\/p>\n<div><a href=\"http:\/\/www.epaperpress.com\/monitorcal\/\">http:\/\/alex.vlachos.com\/graphics\/Vlachos-GDC08-PostProcessingInTheOrangeBox.pdf<\/a><\/div>\n<div><a href=\"http:\/\/www.opengl.org\/registry\/specs\/EXT\/texture_sRGB.txt\">http:\/\/www.opengl.org\/registry\/specs\/EXT\/texture_sRGB.txt<\/a><\/div>\n<div><a href=\"http:\/\/www.opengl.org\/registry\/specs\/EXT\/framebuffer_sRGB.txt\">http:\/\/www.opengl.org\/registry\/specs\/EXT\/framebuffer_sRGB.txt<\/a><\/div>\n<div><a href=\"http:\/\/renderwonk.com\/blog\/index.php\/archive\/adventures-with-gamma-correct-rendering\/\">http:\/\/renderwonk.com\/blog\/index.php\/archive\/adventures-with-gamma-correct-rendering\/<\/a><\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/juhlnet.egloos.com\/m\/1960058 # sRGB \uceec\ub7ec \uacf5\uac04 \uc6b0\ub9ac\uac00 \uc0ac\uc6a9\ud558\ub294 \ub300\ubd80\ubd84\uc758 \ub514\uc9c0\ud138 \uc774\ubbf8\uc9c0 \uc7a5\ube44\ub4e4(\ub514\uce74, \uc2a4\uce90\ub108, \ubaa8\ub2c8\ud130, \ud504\ub9b0\ud130) \uc740 \ud45c\uc900 non-linear \uc0c9 \uacf5\uac04\uc778 sRGB \ub97c \uc0ac\uc6a9\ud558\ub3c4\ub85d \uc815\ud574\uc838\uc788\ub2e4. \ub530\ub77c\uc11c \uc0ac\uc9c4\uc774\ub098 \uadf8\ub9bc\ud30c\uc77c\ub4e4\ub3c4 \uadf8\uc5d0 \ub9de\ucd94\uc5b4\uc9c4 \ud615\ud0dc\ub85c \uc800\uc7a5\ub41c\ub2e4. \ubcf4\ud1b5 \uc774\ubbf8\uc9c0\ub97c \ud569\uc131(\ud544\ud130\ub9c1, \ube14\ub80c\ub529, \uc250\uc774\ub529,..) \ud560\ub54c \uc6b0\ub9ac\ub294 \uc0c9\uacf5\uac04\uc774 linear \ud558\ub2e4\uace0 \uc0dd\uac01\ud558\uc9c0\ub9cc, \uc2e4\uc81c \uc800\uc7a5\ub41c \ud30c\uc77c\uc740 sRGB \uc5d0 \ub9de\ucdb0\uc838 \uc788\uae30 \ub54c\ubb38\uc5d0 \uc5f0\uc0b0 \uc804\uc5d0 \uba3c\uc800 linearize \ud574\uc918\uc57c\u00a0\uc815\ud655\ud55c \uceec\ub7ec [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[36],"class_list":["post-435","post","type-post","status-publish","format-standard","hentry","category-c","tag-rendering"],"_links":{"self":[{"href":"http:\/\/yoonhada.com\/index.php?rest_route=\/wp\/v2\/posts\/435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/yoonhada.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yoonhada.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yoonhada.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/yoonhada.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=435"}],"version-history":[{"count":0,"href":"http:\/\/yoonhada.com\/index.php?rest_route=\/wp\/v2\/posts\/435\/revisions"}],"wp:attachment":[{"href":"http:\/\/yoonhada.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yoonhada.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=435"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yoonhada.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}