{"id":995,"date":"2012-08-16T03:49:16","date_gmt":"2012-08-16T00:49:16","guid":{"rendered":"http:\/\/unitycoder.com\/blog\/?p=995"},"modified":"2012-08-16T17:23:46","modified_gmt":"2012-08-16T14:23:46","slug":"foggy-sky-sun-shader","status":"publish","type":"post","link":"https:\/\/unitycoder.com\/blog\/2012\/08\/16\/foggy-sky-sun-shader\/","title":{"rendered":"Foggy Skydome + Sun &#8211; Shader"},"content":{"rendered":"<p><a title=\"start webplayer demo\" href=\"http:\/\/unitycoder.com\/upload\/demos\/FoggySkyDomeSunAnim1\/\" target=\"_blank\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"996\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2012\/08\/16\/foggy-sky-sun-shader\/foggy_skydome_sun_light_gradient1\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient1.jpg?fit=680%2C364&amp;ssl=1\" data-orig-size=\"680,364\" 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;}\" data-image-title=\"foggy_skydome_sun_light_gradient1\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient1.jpg?fit=300%2C160&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient1.jpg?fit=680%2C364&amp;ssl=1\" class=\"alignnone size-full wp-image-996\" title=\"foggy_skydome_sun_light_gradient1\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient1.jpg?resize=680%2C364\" alt=\"\" width=\"680\" height=\"364\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient1.jpg?w=680&amp;ssl=1 680w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient1.jpg?resize=300%2C160&amp;ssl=1 300w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/a><br \/>\nSkyDome mesh with special shader: Foggy Sun With Gradient Sky (sun direction based on directional light)<br \/>\nCurrently its bit too bright\/foggy.. (this shader converted to unity from NVidia dx11 resources)<\/p>\n<p><strong>Features v1.0<\/strong><br \/>\n&#8211; Adjustable sky texture (not used in the webplayer, just colors. See image #2 for custom sky texture)<br \/>\n&#8211; Adjustable dark &amp; light colors<br \/>\n&#8211; Sun direction can be animated by rotating directional light<br \/>\n&#8211; 1 Skydome mesh with 1 shader (no unity fog enabled)<\/p>\n<p><strong>Ideas:<\/strong><br \/>\n&#8211; Adjust colors (darker night or different night texture?)<br \/>\n&#8211; Animated clouds? (or use the previous animated sky clouds system?)<br \/>\n&#8211; Use better skydome mesh? (now its using default unity sphere..)<\/p>\n<p><strong>Webplayer:<\/strong><br \/>\n<a title=\"start webplayer demo\" href=\"http:\/\/unitycoder.com\/upload\/demos\/FoggySkyDomeSunAnim1\/\" target=\"_blank\">http:\/\/unitycoder.com\/upload\/demos\/FoggySkyDomeSunAnim1\/<\/a><\/p>\n<p><strong>Download source:<\/strong><br \/>\nlater..<\/p>\n<p>&#8212;<\/p>\n<p>image#2 : using colored sky texture<br \/>\n<img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"997\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2012\/08\/16\/foggy-sky-sun-shader\/foggy_skydome_sun_light_gradient2\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient2.jpg?fit=680%2C484&amp;ssl=1\" data-orig-size=\"680,484\" 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;}\" data-image-title=\"foggy_skydome_sun_light_gradient2\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient2.jpg?fit=300%2C213&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient2.jpg?fit=680%2C484&amp;ssl=1\" class=\"alignnone size-full wp-image-997\" title=\"foggy_skydome_sun_light_gradient2\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient2.jpg?resize=680%2C484\" alt=\"\" width=\"680\" height=\"484\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient2.jpg?w=680&amp;ssl=1 680w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient2.jpg?resize=300%2C213&amp;ssl=1 300w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/p>\n<p>&#8212;<\/p>\n<p>image#3: using sky texture, now the bright sun area is bit smaller (some fog corona effect there, not sure where its coming..)<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1002\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2012\/08\/16\/foggy-sky-sun-shader\/foggy_skydome_sun_light_gradient3\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient3.jpg?fit=680%2C453&amp;ssl=1\" data-orig-size=\"680,453\" 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;}\" data-image-title=\"foggy_skydome_sun_light_gradient3\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient3.jpg?fit=300%2C199&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient3.jpg?fit=680%2C453&amp;ssl=1\" class=\"alignnone size-full wp-image-1002\" title=\"foggy_skydome_sun_light_gradient3\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient3.jpg?resize=680%2C453\" alt=\"\" width=\"680\" height=\"453\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient3.jpg?w=680&amp;ssl=1 680w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient3.jpg?resize=300%2C199&amp;ssl=1 300w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SkyDome mesh with special shader: Foggy Sun With Gradient Sky (sun direction based on directional light) Currently its bit too bright\/foggy.. (this shader converted to unity from NVidia dx11 resources) Features v1.0 &#8211; Adjustable sky texture (not used in the webplayer, just colors. See image [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":996,"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":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,3],"tags":[270,284,283,273,14,255,254,282],"class_list":["post-995","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-demos","category-unity3d","tag-animated","tag-cycle","tag-daylight","tag-fog","tag-shader","tag-sky","tag-skydome","tag-sun"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/foggy_skydome_sun_light_gradient1.jpg?fit=680%2C364&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1KTaT-g3","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/995","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/comments?post=995"}],"version-history":[{"count":5,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/995\/revisions"}],"predecessor-version":[{"id":1000,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/995\/revisions\/1000"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media\/996"}],"wp:attachment":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media?parent=995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/categories?post=995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/tags?post=995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}