GLSL

night vision

Welcome to part three of my series on creating cool looking shaders of the not-quite-night-vision-but-still-looks-pretty-good variety. You can go check out part 1 or part 2 if you missed either of those. Go ahead, I’ll wait…

Hi again! Let’s jump right in, shall we? This time, we’re going to put a little effort into maintaining the overall energy-per-pixel to the greatest extent that is convenient and easy. After all, we are pretty damn lazy. Adjusting the contrast will skew things, but the main point is that full-color, gray, and green modes should otherwise all look approximately as bright as each other.

Continue Reading

night visionWelcome back! This is part two of my series detailing the step-by-step creation of a night-vision-style fragment shader. You can check out part one here if you haven’t yet. We’ll be building on the code from previous article, but it’s not very complicated at this point.

Let’s add some code to crank up the contrast. As an added bonus, we’ll add a flag to pick green or grayscale rendering, to give us some options when defining the look of our games.

Continue Reading

night visionLately, I’ve been intrigued by shaders that emulate other visual effects and certain camera technologies. I’ve been considering doing a night vision kinda thing for my current project for quite some time, but  I’ve been feeling kinda ambivalent about the whole thing. Recently, I got Zombie Gunship from the Humble Mobile Bundle, and they do the effect very impressively.

This got me thinking, what would it take to implement something like this? The primary requirement, other than looking badass, would be that I don’t have to re-author any graphics assets. I’d want all my geometry and textures to just work. Because I am lazy. The secondary requirement would be that the shader code should be as simple as I can make it, again because I am lazy (but also for efficiency’s sake).

Continue Reading