Converting the Oblivion radar display to NME

I’ve gone a little bit back to basics now, with the goal of improving these three areas:

  • Composability
  • Reusability
  • Readability

The biggest thing I think that can contribute to all three at the same time is to break down the various elements into frames, similarly to how the original shader uses different functions to organize the shader code neatly.

(Note – the NME seems to have a bit of trouble displaying the inputs on the collapsed frame despite instructions to do so, doesn’t look like it’s calculating correct collapsed dimensions for the frame maybe).

Here is the CircleShape frame that can be dropped into any fragment shader in the NME and be immediately useful (I’m not sure how to share JSON files on the forum, so Gist it is for now…).

This has been an incredibly useful journey into learning both shaders and NME!

Ed: Here is an example NME procedural texture that uses the circle frame to draw multiple concentric circles

1 Like

Sorry to keep bumping this, but putting it all together and we’re starting to get something interesting!

1 Like

Though not much of a visual overhaul, I’ve made two main improvements with this revision:

  1. The multiple textureSize blocks have been replaced with a single one.
  2. Replaced constant float values for various sizes with percentages that scale with texture size

In other words, the procedural texture’s image will now correctly scale its’ contents with the resolution of the texture! Here’s a PG with it

3 Likes

I’ve developed a playground considerably that makes use of this procedural texture to actually display game-relevant data on the radar! As @PirateJC would say, “how cool is that?!” :slight_smile: :sunglasses:

I think I might want to speed up the radar sweep, since it may be tougher to see upcoming obstacles otherwise, but maybe that would be a difficulty setting?

8 Likes