Skip to content
View srijan-paul's full-sized avatar
🍉
nom
🍉
nom

Organizations

@pallene-lang @cpp-gamedev
Block or Report

Block or report srijan-paul

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
srijan-paul/README.md

injuly

I like systems programming and functional languages. Professionally, I've worked on web servers, SPAs, compilers, static analyzers, and other miscellany.

Interests:

  • Game dev, compilers, type systems.
  • Pixel art
  • Shin Honkaku
  • Functional programming

Microblog

A list of thoughts that aren't not elaborate enough to warrant a blog post, but interesting enough to be written down.

Click to read

1. CRT displays and retro shaders

I find it very interesting that video games today often try to emulate artifacts of the past that older developers would kill to get rid of. The CRT screen shader is one of them. I wrote one for one of my (now abandoned) side projects, and was happy with how it turned out. Here is an old GIF of the effect:

The above shader displays two of my favorite effects that nail the "retro" feel when done well:

  1. The CRT screen bend.
  2. Chromatic Abberation.

It also has a scanline effect, but that's off topic.

CRT screens would shoot a cathode ray that would traverse the screen row-by-row. If the screens weren't curved in shape, different points on the surface would be at different distances from the origin of the cathode ray, resulting in a distorted image. The screens had to be curved at very precise angles to perfectly offset the distortion.

Since It's getting pretty late in the night at the time of me writing this, I'll leave this great explanation on chromatic aberration by an underrated youtuber, Pixel Prophecy:

If you're wondering how it's implemented in the gif I showed above, I just offset the Red, Green, and Blue channels for every on-screen pixel. As for the scanlines, they're just periodically occuring horizontal lines timed with a sine wave.

Pinned

  1. nez nez Public

    An emulator for the NES console.

    Zig 20 2

  2. snap snap Public

    An embeddable scripting language inspired by Lua.

    C++ 42 4

  3. bark bark Public

    A static site generator that powers my blog

    Haskell 10 1

  4. shriek shriek Public

    A horror indie game

    Lua 3 1

  5. pureman pureman Public

    A faithful Pacman clone in PureScript (for fiddling with AI algorithms :))

    PureScript

  6. frametap frametap Public

    Cross platform screen capture library

    Zig 2 1