{"id":7703,"date":"2019-04-07T14:43:20","date_gmt":"2019-04-07T13:43:20","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=7703"},"modified":"2019-04-07T14:43:20","modified_gmt":"2019-04-07T13:43:20","slug":"p0-a3-part-542-world-builder","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p0-a3-part-542-world-builder\/","title":{"rendered":"P0-A3: Part 542: World Builder"},"content":{"rendered":"<p>The issue with the planet textures and shaders at long distances from the origin should be fixed.<\/p>\n<p>The solution was to actually encode the terrain height into a second mesh UV channel, and then simply read that data from the shader. This was a much more elegant and effective solution than performing a distance calculation in the shader itself.<\/p>\n<p>I have still got quite a bit of work to do on the shaders, there are several shaders involved in terrain rendering, including water\/ocean shaders, grass shaders, and the actually terrain shader itself, they will all need to be modified.<\/p>\n<p><a href=\"https:\/\/imgur.com\/K1FaKtB\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/K1FaKtBm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/JeQaSbN\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/JeQaSbNm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/6h7Fzz4\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/6h7Fzz4m.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/WyHgPgG\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/WyHgPgGm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/jlPL87z\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/jlPL87zm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/nxtX7A5\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/nxtX7A5m.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/7LBEBjs\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/7LBEBjsm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/Xmsj0dG\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/Xmsj0dGm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/iic9yNz\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/iic9yNzm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/tY5hLGh\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/tY5hLGhm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/MVK5Bia\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/MVK5Biam.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/p6lCBEr\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/p6lCBErm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/rNvpIWq\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/rNvpIWqm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/EtfQqkx\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/EtfQqkxm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/QWeqzyy\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/QWeqzyym.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/kT7OVPK\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/kT7OVPKm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/qf2n3OQ\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/qf2n3OQm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/PFJgPDl\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/PFJgPDlm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/RlILZln\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/RlILZlnm.png\" title=\"source: imgur.com\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The issue with the planet textures and shaders at long distances from the origin should be fixed. The solution was to actually encode the terrain height into a second mesh UV channel, and then simply read that data from the shader. This was a much more elegant and effective solution than performing a distance calculation [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,3,17,10,11],"tags":[],"class_list":["post-7703","post","type-post","status-publish","format-standard","hentry","category-a3","category-astral-realms","category-p-0","category-software-and-games","category-spiritus-astrum","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"builder_content":"","_links":{"self":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/7703"}],"collection":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/comments?post=7703"}],"version-history":[{"count":1,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/7703\/revisions"}],"predecessor-version":[{"id":7704,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/7703\/revisions\/7704"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=7703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=7703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=7703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}