{"id":3309,"date":"2014-07-11T23:19:55","date_gmt":"2014-07-11T13:19:55","guid":{"rendered":"http:\/\/www.vectorstorm.org\/?p=3309"},"modified":"2014-07-11T23:19:55","modified_gmt":"2014-07-11T13:19:55","slug":"lines-in-screen-space","status":"publish","type":"post","link":"https:\/\/www.vectorstorm.com.au\/2014\/07\/11\/lines-in-screen-space\/","title":{"rendered":"Lines in screen space"},"content":{"rendered":"

I ran into a creative roadblock today, and so eventually gave up and worked on a technical problem, instead: making the engine’s 3D line rendering work using screen-space line widths. That is, if I ask for lines 5 pixels wide, I should get lines 5 pixels wide, no matter how close or far they are from the camera.<\/p>\n

This is actually a somewhat tricky procedure; I’m building 3D rectangles which, when viewed from the current camera, appear to be of a single, set width across their whole length. And the way that I’m doing it won’t necessarily work properly in all cases, particularly when a line extends from in front of the camera to behind the camera.<\/p>\n

But for the moment, it seems to be working out okay.<\/p>\n

What follows is the set of screenshots I took over the course of the day, as I tried to make cursor outlines exactly five pixels wide, regardless of how close or far away the cursor was from the camera. As you can see, there were a lot of failures along the way! (If there’s interest, I’ll post a technical breakdown of how I’m doing this)<\/p>\n

Virtually no progress on the MS5 build today, which means that it might be pushed out one extra day, to Sunday. But hopefully no later than that!<\/p>\n