{"id":3126,"date":"2014-02-28T19:13:11","date_gmt":"2014-02-28T09:13:11","guid":{"rendered":"http:\/\/www.vectorstorm.org\/?p=3126"},"modified":"2014-02-28T19:23:05","modified_gmt":"2014-02-28T09:23:05","slug":"v2-bloom","status":"publish","type":"post","link":"https:\/\/www.vectorstorm.com.au\/2014\/02\/28\/v2-bloom\/","title":{"rendered":"V2 Bloom"},"content":{"rendered":"

\"bloom\"<\/a><\/p>\n

The VectorStorm version 2 project has reached a milestone today:\u00a0 the “glow” shader has been reimplemented to work with it.<\/p>\n

In the original VectorStorm library, this “bloom” effect was implemented using about 200 lines of raw OpenGL code.\u00a0 It was ugly code, it was difficult to follow, it was difficult to maintain.<\/p>\n

In the new V2 library, the “bloom” effect is now implemented using VectorStorm’s built-in rendering commands — the same commands used to render models and UI.\u00a0 Instead of 200 lines of explicit OpenGL code, it now uses just 60 lines of VectorStorm rendering instructions.\u00a0 Which means that it’s vastly easier to read and maintain, and also that it ought to simply work if someday I was to port VectorStorm V2 to DirectX or some other rendering API.<\/p>\n

You wouldn’t believe how long I’ve been dreading trying to make this work.\u00a0 In the end, it only took a single day.<\/p>\n

There’s still a bit of work to be done, of course.\u00a0 There are big issues around how render targets are allocated and managed which I need to clear up.\u00a0 And I need to make some difficult choices regarding how to manage custom shaders in V2.\u00a0 And the default rendering pipeline a game gets if it doesn’t request anything special doesn’t include the bloom shader yet.\u00a0 But getting bloom to work at all in the new V2 codebase was the big tricky part.\u00a0 And it’s handled, now — everything else is just accounting.<\/p>\n","protected":false},"excerpt":{"rendered":"

The VectorStorm version 2 project has reached a milestone today:\u00a0 the “glow” shader has been reimplemented to work with it. In the original VectorStorm library, this “bloom” effect was implemented using about 200 lines of raw OpenGL code.\u00a0 It was ugly code, it was difficult to follow, it was difficult to maintain. In the new…<\/p>\n","protected":false},"author":1,"featured_media":3130,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[4,3],"tags":[],"jetpack_featured_media_url":"https:\/\/www.vectorstorm.com.au\/wp-content\/uploads\/2014\/02\/bloomthumb1.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/po9WK-Oq","_links":{"self":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/3126"}],"collection":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/comments?post=3126"}],"version-history":[{"count":1,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/3126\/revisions"}],"predecessor-version":[{"id":3129,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/3126\/revisions\/3129"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/media\/3130"}],"wp:attachment":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/media?parent=3126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/categories?post=3126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/tags?post=3126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}