{"id":113,"date":"2014-12-20T20:18:21","date_gmt":"2014-12-20T18:18:21","guid":{"rendered":"http:\/\/heikkili.kapsi.fi\/blog\/?p=113"},"modified":"2016-02-09T22:00:09","modified_gmt":"2016-02-09T20:00:09","slug":"cg-study-5","status":"publish","type":"post","link":"http:\/\/heikkili.kapsi.fi\/blog\/?p=113","title":{"rendered":"Directx11 book exercises, Texture sampler address modes and multitexturing"},"content":{"rendered":"<p>I have been re-reading Frank Luna&#8217;s DirectX11 book and also doing some of the most interesting exercises that are in end of each chapter. I will post some of the exercise solution snippets so I can review them easier later and use them if I need.<\/p>\n<h4>Texture sampler address modes<\/h4>\n<p>Chapter 8 discussed texturing and the <strong>ex. 1<\/strong> asked to modify<strong> texture coordinates<\/strong> and <strong>texture samplers address modes<\/strong> to reproduce some example images of the chapter.<br \/>\nHere is screenshots of the books crate demo with different address modes: border, clamp, mirror and wrap.<\/p>\n<figure id=\"attachment_114\" aria-describedby=\"caption-attachment-114\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_border.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"114\" data-permalink=\"http:\/\/heikkili.kapsi.fi\/blog\/?attachment_id=114\" data-orig-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_border.png?fit=816%2C639\" data-orig-size=\"816,639\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Capturech8ex1_border\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_border.png?fit=300%2C235\" data-large-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_border.png?fit=650%2C509\" tabindex=\"0\" role=\"button\" class=\"wp-image-114 size-medium\" src=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_border.png?resize=300%2C235\" alt=\"Capturech8ex1_border\" width=\"300\" height=\"235\" srcset=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_border.png?resize=300%2C235 300w, https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_border.png?resize=383%2C300 383w, https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_border.png?w=816 816w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-114\" class=\"wp-caption-text\">border<\/figcaption><\/figure>\n<figure id=\"attachment_115\" aria-describedby=\"caption-attachment-115\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_clamp.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"115\" data-permalink=\"http:\/\/heikkili.kapsi.fi\/blog\/?attachment_id=115\" data-orig-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_clamp.png?fit=816%2C639\" data-orig-size=\"816,639\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Capturech8ex1_clamp\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_clamp.png?fit=300%2C235\" data-large-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_clamp.png?fit=650%2C509\" tabindex=\"0\" role=\"button\" class=\"wp-image-115 size-medium\" src=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_clamp.png?resize=300%2C235\" alt=\"Capturech8ex1_clamp\" width=\"300\" height=\"235\" srcset=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_clamp.png?resize=300%2C235 300w, https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_clamp.png?resize=383%2C300 383w, https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_clamp.png?w=816 816w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-115\" class=\"wp-caption-text\">clamp<\/figcaption><\/figure>\n<figure id=\"attachment_116\" aria-describedby=\"caption-attachment-116\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_mirror.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"116\" data-permalink=\"http:\/\/heikkili.kapsi.fi\/blog\/?attachment_id=116\" data-orig-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_mirror.png?fit=816%2C639\" data-orig-size=\"816,639\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Capturech8ex1_mirror\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_mirror.png?fit=300%2C235\" data-large-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_mirror.png?fit=650%2C509\" tabindex=\"0\" role=\"button\" class=\"wp-image-116 size-medium\" src=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_mirror.png?resize=300%2C235\" alt=\"Capturech8ex1_mirror\" width=\"300\" height=\"235\" srcset=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_mirror.png?resize=300%2C235 300w, https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_mirror.png?resize=383%2C300 383w, https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_mirror.png?w=816 816w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-116\" class=\"wp-caption-text\">mirror<\/figcaption><\/figure>\n<figure id=\"attachment_117\" aria-describedby=\"caption-attachment-117\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_wrap.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"117\" data-permalink=\"http:\/\/heikkili.kapsi.fi\/blog\/?attachment_id=117\" data-orig-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_wrap.png?fit=816%2C639\" data-orig-size=\"816,639\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Capturech8ex1_wrap\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_wrap.png?fit=300%2C235\" data-large-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_wrap.png?fit=650%2C509\" tabindex=\"0\" role=\"button\" class=\"wp-image-117 size-medium\" src=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_wrap.png?resize=300%2C235\" alt=\"Capturech8ex1_wrap\" width=\"300\" height=\"235\" srcset=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_wrap.png?resize=300%2C235 300w, https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_wrap.png?resize=383%2C300 383w, https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex1_wrap.png?w=816 816w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-117\" class=\"wp-caption-text\">wrap<\/figcaption><\/figure>\n<p>Texture coordinates of a cube where simply modified to range -0.5 to 2.5<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nvertices&#x5B;k].Tex.x *= vertices&#x5B;k].Tex.x*3.0f - 0.5f;\r\nvertices&#x5B;k].Tex.y = vertices&#x5B;k].Tex.y*3.0f - 0.5f;\r\n<\/pre>\n<p>example <strong>sampler state<\/strong> in shader<\/p>\n<p>SamplerState samAnisotropic<br \/>\n{<br \/>\n\tFilter = ANISOTROPIC;<br \/>\n\tMaxAnisotropy = 4;<\/p>\n<p>\tAddressU = WRAP;<br \/>\n\tAddressV = WRAP;<br \/>\n};<\/p>\n<h4><strong>Multi texturing with component wise multiplication<\/strong><\/h4>\n<p><strong>ex. 3 <\/strong>was an exercise about multi-texturing. It asked to modify the crate demo by component-wise multiplying two textures in pixel shader. Other texture was a flame texture and another was its alpha map texture.<\/p>\n<p>I added two texture support for the effect by creating another<strong>\u00a0ID3D11ShaderResourceView<\/strong> and\u00a0 <strong>ID3DX11EffectShaderResourceVariable<\/strong> to CrateDemo.cpp and to the Effect.h files and then modified the basic effect Basix.fx hlsl code in pixel shader to actually do the component wise multiplication;<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nfloat4 texColor = float4(1, 1, 1, 1);\r\nfloat4 texAlphaColor = float4(1, 1, 1, 1);\r\n\r\nif(gUseTexure)\r\n{\r\n\ttexColor\t\t= gDiffMap1.Sample(samAnisotropic, pin.Tex);\r\n\ttexAlphaColor\t= gDiffMapAlpha1.Sample(samAnisotropic, pin.Tex);\r\n\ttexColor *= texAlphaColor;\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/componentwisemultip.png\" rel=\"attachment wp-att-210\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"210\" data-permalink=\"http:\/\/heikkili.kapsi.fi\/blog\/?attachment_id=210\" data-orig-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/componentwisemultip.png?fit=590%2C276\" data-orig-size=\"590,276\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"componentwisemultip\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/componentwisemultip.png?fit=300%2C140\" data-large-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/componentwisemultip.png?fit=590%2C276\" tabindex=\"0\" role=\"button\" class=\"size-medium wp-image-210 alignleft\" src=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/componentwisemultip.png?resize=300%2C140\" alt=\"componentwisemultip\" width=\"300\" height=\"140\" srcset=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/componentwisemultip.png?resize=300%2C140 300w, https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/componentwisemultip.png?w=590 590w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>produces result like this:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex3.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"122\" data-permalink=\"http:\/\/heikkili.kapsi.fi\/blog\/?attachment_id=122\" data-orig-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex3.png?fit=816%2C639\" data-orig-size=\"816,639\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Capturech8ex3\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex3.png?fit=300%2C235\" data-large-file=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex3.png?fit=650%2C509\" tabindex=\"0\" role=\"button\" class=\"alignleft wp-image-122 size-medium\" src=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex3.png?resize=300%2C235\" alt=\"Capturech8ex3\" width=\"300\" height=\"235\" srcset=\"https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex3.png?resize=300%2C235 300w, https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex3.png?resize=383%2C300 383w, https:\/\/i0.wp.com\/heikkili.kapsi.fi\/blog\/wp-content\/uploads\/2014\/12\/Capturech8ex3.png?w=816 816w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4>Rotating texture and flipping animation<\/h4>\n<p><strong>ex. 4<\/strong> Asked to rotate the fireball texture of ex 3 by a function over time. I did it like this in vertex shader:<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nvout.Tex = mul(float4(vin.Tex, 0.0f, 1.0f), gTexTransform).xy;\r\n\r\nfloat x = vout.Tex.x - 0.5;\r\nfloat y = vout.Tex.y - 0.5;\r\nvout.Tex.x = x*cos(1.0*gTime) - y*sin(1.0*gTime);\r\nvout.Tex.y = x*sin(1.0*gTime) + y*cos(1.0*gTime);\r\n\r\nvout.Tex.x += 0.5f;\r\nvout.Tex.y += 0.5f;\r\n<\/pre>\n<p><strong>ex 5<\/strong> asked to implement simple fire animation on the cube by flipping textures. It asked to change the fire texture every 1\/30 of second. 120 fire textures was given and hint to create array for them, also it was suggested that it would be more efficient to have one texture atlas and change texture coordinates every frame. I was lazy to make those 120 textures to one bigger texture in gimp or apint.net so I used texture array and changed the texture to gpu every frame.<br \/>\nextra member variables<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nfloat mLastFlip;\r\nint  mCurrentFrame;\r\n<\/pre>\n<p>reading textures to array\u00a0 in init method:<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nfor (int i = 1; i &lt; 121; i++)\r\n{\r\n\tstd::wstring num = L&quot;0&quot;;\r\n\tif (i &lt; 10) num = L&quot;00&quot; + std::to_wstring(i); if (i &gt;= 10 &amp; i &lt; 100) num = L&quot;0&quot; + std::to_wstring(i); if (i &gt;= 100)\r\n\t\tnum = std::to_wstring(i);\r\n\r\n\tstd::wstring fileName = L&quot;Textures\/FireAnim\/Fire&quot; + num + L&quot;.bmp&quot;;\r\n\tHR(D3DX11CreateShaderResourceViewFromFile(md3dDevice,\r\n\t\tfileName.c_str(), 0, 0, &amp;mFireTextures&#x5B;i-1], 0));\r\n}\r\n<\/pre>\n<p>updating the frame in update<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nif (mTimer.TotalTime() - mLastFlip &gt; (1.0f \/ 30.0f))\r\n{\r\n\tmLastFlip = mTimer.TotalTime();\r\n\tmCurrentFrame++;\r\n\tif (mCurrentFrame &gt;= 120)\r\n\t\tmCurrentFrame = 0;\r\n}\r\n<\/pre>\n<p>and finally inside draw()<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nEffects::BasicFX-&gt;SetDiffuseMap(mFireTextures&#x5B;mCurrentFrame]);\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have been re-reading Frank Luna&#8217;s DirectX11 book and also doing some of the most interesting exercises that are in end of each chapter. I will post some of the exercise solution snippets so I can review them easier later and use them if I need. Texture sampler address modes Chapter 8 discussed texturing and&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6],"tags":[16,2,17,19,20,18],"class_list":["post-113","post","type-post","status-publish","format-standard","hentry","category-computer-graphics","tag-book","tag-directx11","tag-exercises","tag-multi-texturing","tag-sampler","tag-texturing"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p7k3DT-1P","_links":{"self":[{"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=\/wp\/v2\/posts\/113"}],"collection":[{"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=113"}],"version-history":[{"count":15,"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions"}],"predecessor-version":[{"id":214,"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions\/214"}],"wp:attachment":[{"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}