{"id":879,"date":"2012-06-09T20:35:37","date_gmt":"2012-06-10T00:35:37","guid":{"rendered":"http:\/\/alexlemke.com\/wordpress\/?p=879"},"modified":"2012-06-24T13:35:37","modified_gmt":"2012-06-24T17:35:37","slug":"a-few-shaders-more","status":"publish","type":"post","link":"http:\/\/alexlemke.com\/wordpress\/a-few-shaders-more\/","title":{"rendered":"A Few Shaders More"},"content":{"rendered":"<p>Here&#8217;s a few more shader examples that were all done in FxComposer.<\/p>\n<p>First we have a shadow map example. &nbsp;To create a simple shadow effect you simply have to render the scene from the lights perspective into a shadow map. &nbsp;The shadow map stores the distances from the light&#8217;s point of view and by using the shadow map you can determine if something should be shadowed or not.<\/p>\n<p><a href=\"http:\/\/alexlemke.com\/wordpress\/wp-content\/uploads\/2012\/06\/ShadowMapping.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-903\" title=\"ShadowMapping\" src=\"http:\/\/alexlemke.com\/wordpress\/wp-content\/uploads\/2012\/06\/ShadowMapping-300x186.png\" alt=\"\" width=\"300\" height=\"186\" srcset=\"http:\/\/alexlemke.com\/wordpress\/wp-content\/uploads\/2012\/06\/ShadowMapping-300x186.png 300w, http:\/\/alexlemke.com\/wordpress\/wp-content\/uploads\/2012\/06\/ShadowMapping.png 845w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>We also have a&nbsp;protective&nbsp;texture mapping example. &nbsp;The soft shadows are done by using a texture to show where the spotlight should effect and for how strong. &nbsp;It&#8217;s a simple way to do soft shadows for spot lights.<\/p>\n<p><a href=\"http:\/\/alexlemke.com\/wordpress\/wp-content\/uploads\/2012\/06\/ProjectiveTextureMapping.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-902\" title=\"ProjectiveTextureMapping\" src=\"http:\/\/alexlemke.com\/wordpress\/wp-content\/uploads\/2012\/06\/ProjectiveTextureMapping-300x283.png\" alt=\"\" width=\"300\" height=\"283\" srcset=\"http:\/\/alexlemke.com\/wordpress\/wp-content\/uploads\/2012\/06\/ProjectiveTextureMapping-300x283.png 300w, http:\/\/alexlemke.com\/wordpress\/wp-content\/uploads\/2012\/06\/ProjectiveTextureMapping.png 558w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The final two shaders we have this week are static environmental&nbsp;mapping and a skybox effect. &nbsp;Both effects use a cube map. &nbsp;To do dynamic&nbsp;environmental&nbsp;mapping you would&nbsp;have&nbsp;to create the&nbsp;cube map&nbsp;at run time.<\/p>\n<p><a href=\"http:\/\/alexlemke.com\/wordpress\/wp-content\/uploads\/2012\/06\/StaticEnviromentalMappingAndSkybox.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-904\" title=\"StaticEnvironmentallMappingAndSkybox\" src=\"http:\/\/alexlemke.com\/wordpress\/wp-content\/uploads\/2012\/06\/StaticEnviromentalMappingAndSkybox-300x198.png\" alt=\"\" width=\"300\" height=\"198\" srcset=\"http:\/\/alexlemke.com\/wordpress\/wp-content\/uploads\/2012\/06\/StaticEnviromentalMappingAndSkybox-300x198.png 300w, http:\/\/alexlemke.com\/wordpress\/wp-content\/uploads\/2012\/06\/StaticEnviromentalMappingAndSkybox.png 657w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.alexlemke.com\/Graphics\/Shaders\/HLSL\/SpotLightShadow_Shader.fx\">Spot Light with Simple Shadow<\/a><\/p>\n<p><a href=\"http:\/\/www.alexlemke.com\/Graphics\/Shaders\/HLSL\/ProjectiveTextureMapping_Shader.fx\">Projective Texture Mapping with Shadows<\/a><\/p>\n<p><a href=\"http:\/\/www.alexlemke.com\/Graphics\/Shaders\/HLSL\/EnvironmentMapping.fx\">Static Environmental Mapping<\/a><\/p>\n<p><a href=\"http:\/\/www.alexlemke.com\/Graphics\/Shaders\/HLSL\/Skybox_Shader.fx\">Skybox Effect<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>I&#8217;ve also included a link to a project of combined effect shaders that I have done. &nbsp;Most of the shaders I&#8217;ve uploaded so far are for a single&nbsp;unique&nbsp;effect. &nbsp;I&#8217;ll be focusing more of combining effects together from this point on.&nbsp;<\/p>\n<p><a href=\"http:\/\/www.alexlemke.com\/Graphics\/Shaders\/HLSL\/ShaderCollection.zip\">Combined Effect Shader Project<\/a><br \/>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a few more shader examples that were all done in FxComposer. First we have a shadow map example. &nbsp;To create a simple shadow effect you simply have to render the scene from the lights perspective into a shadow map. &nbsp;The shadow map stores the distances from the light&#8217;s point of view and by using [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,23],"tags":[24,25],"class_list":["post-879","post","type-post","status-publish","format-standard","hentry","category-graphics","category-shaders","tag-hlsl","tag-shader"],"_links":{"self":[{"href":"http:\/\/alexlemke.com\/wordpress\/wp-json\/wp\/v2\/posts\/879","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/alexlemke.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/alexlemke.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/alexlemke.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/alexlemke.com\/wordpress\/wp-json\/wp\/v2\/comments?post=879"}],"version-history":[{"count":9,"href":"http:\/\/alexlemke.com\/wordpress\/wp-json\/wp\/v2\/posts\/879\/revisions"}],"predecessor-version":[{"id":908,"href":"http:\/\/alexlemke.com\/wordpress\/wp-json\/wp\/v2\/posts\/879\/revisions\/908"}],"wp:attachment":[{"href":"http:\/\/alexlemke.com\/wordpress\/wp-json\/wp\/v2\/media?parent=879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/alexlemke.com\/wordpress\/wp-json\/wp\/v2\/categories?post=879"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/alexlemke.com\/wordpress\/wp-json\/wp\/v2\/tags?post=879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}