{"id":100,"date":"2006-07-15T17:22:38","date_gmt":"2006-07-15T21:22:38","guid":{"rendered":"http:\/\/www.rakkar.org\/blog\/?p=100"},"modified":"2006-07-15T17:22:38","modified_gmt":"2006-07-15T21:22:38","slug":"fog-shader-2","status":"publish","type":"post","link":"https:\/\/rakkar.org\/blog\/index.php\/2006\/07\/15\/fog-shader-2\/","title":{"rendered":"Fog shader"},"content":{"rendered":"<p>\t\t\t\tThis is a shader I wrote, with help, that determines the amount of fog between the top of the fog layer and the ground beneath using the z-buffer.  It then applies alpha to the fog based on that amount.  The shader also supports fog holes where you can use a heighfield that will reduce the fog based on the image.  It uses parallax mapping to give the appearance of a 3D fog basin.<\/p>\n<p><a HREF=\"http:\/\/www.rakkar.org\/blog\/images\/fog.jpg\"><img src=\"http:\/\/www.rakkar.org\/blog\/images\/fog.jpg\" alt=\"Fog\" \/><\/a><\/p>\n<p>The fog is less nearer the bottom of the screen because of the camera angle.  It is also less around the rocks because it is closer to the ground there.<\/p>\n<p>The fog does not clip the rocks because of this technique.\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a shader I wrote, with help, that determines the amount of fog between the top of the fog layer and the ground beneath using the z-buffer. It then applies alpha to the fog based on that amount. The shader also supports fog holes where you can use a heighfield that will reduce the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/100"}],"collection":[{"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=100"}],"version-history":[{"count":0,"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/100\/revisions"}],"wp:attachment":[{"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}