{"id":1557,"date":"2018-01-20T20:10:09","date_gmt":"2018-01-21T02:10:09","guid":{"rendered":"http:\/\/www.philhassey.com\/blog\/?p=1557"},"modified":"2018-01-20T20:12:23","modified_gmt":"2018-01-21T02:12:23","slug":"lighting-engine","status":"publish","type":"post","link":"https:\/\/www.philhassey.com\/blog\/2018\/01\/20\/lighting-engine\/","title":{"rendered":"Lighting engine"},"content":{"rendered":"<p>I put together a lighting engine this week.\u00a0 It took a lot of coding before I could really test anything.<\/p>\n<p>My first test effort I just rendered things as boxes to ensure that I even had the correct data.<\/p>\n<p><a href=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2018\/01\/protoScreenSnapz007.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2018\/01\/protoScreenSnapz007.png\" alt=\"\" width=\"981\" height=\"667\" \/><\/a><\/p>\n<p>Next I did some ray casting so I could see if I got that working.<\/p>\n<p><a href=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2018\/01\/protoScreenSnapz008.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2018\/01\/protoScreenSnapz008.png\" alt=\"\" width=\"854\" height=\"654\" \/><\/a><\/p>\n<p>Lastly I rendered those rays using a triangle fan.<\/p>\n<p><a href=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2018\/01\/protoScreenSnapz009.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2018\/01\/protoScreenSnapz009.png\" alt=\"\" width=\"854\" height=\"654\" \/><\/a><\/p>\n<p>I found that the CPU was being maxed out pretty bad, it turns out my first step (showing the boxes) was using the most. So I turned those off and things ran at a nice clip.<\/p>\n<p>-Phil<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I put together a lighting engine this week.\u00a0 It took a lot of coding before I could really test anything. My first test effort I just rendered things as boxes to ensure that I even had the correct data. Next I did some ray casting so I could see if I got that working. Lastly [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[128,129],"tags":[],"class_list":["post-1557","post","type-post","status-publish","format-standard","hentry","category-featured","category-proto"],"_links":{"self":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/1557","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/comments?post=1557"}],"version-history":[{"count":2,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/1557\/revisions"}],"predecessor-version":[{"id":1562,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/1557\/revisions\/1562"}],"wp:attachment":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/media?parent=1557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/categories?post=1557"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/tags?post=1557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}