logoalt Hacker News

I put a real-time 3D shader on the Game Boy Color

209 pointsby adunktoday at 4:28 PM24 commentsview on HN

Comments

spepstoday at 6:06 PM

Awesome looking results. As far as I understand it's a "3D" shader in the sense that it looks 3D but it's a prerendered 2D normal map which is then lit using the resulting world space normal.

Here are the frames: https://github.com/nukep/gbshader/tree/main/sequences/gbspin...

show 1 reply
glouwbugtoday at 6:23 PM

It’s nice getting real hacker material on hackernews

show 1 reply
otterstacktoday at 9:33 PM

Hi, author here. I heard it got posted here and decided to make an account, so I can hop in here. Thanks for sharing!

I'm also looking into simplifying it a bit more with environment maps, which I shared on my Bsky: https://bsky.app/profile/dannyspencer.bsky.social/post/3mecu...

wasmainiactoday at 6:48 PM

> An overall failed attempt at using AI > I attempted to use AI to try out the process, mostly because 1) the industry won't shut up about AI, and 2) I wanted a grounded opinion of it for novel projects, so I have a concrete and personal reference point when talking about it in the wild. At the end of the day, this is still a hobbyist project, so AI really isn't the point! But still...

> I believe in disclosing all attempts or actual uses of generative AI output, because I think it's unethical to deceive people about the process of your work. Not doing so undermines trust, and amounts to disinformation or plagiarism. Disclosure also invites people who have disagreements to engage with the work, which they should be able to. I'm open to feedback, btw.

Thank you for your honesty! Also tremendous project.

show 1 reply
spacebacontoday at 6:39 PM

This GBC shader reveals a key truth: all computation is approximation under constraint. Multiplication becomes table lookups plus addition, while precision yields to what the eye actually sees.

Waterluviantoday at 8:48 PM

I’m incredibly impressed by this, largely because it actually is running on a CGB. What I see often are hacks where the game boy is just being used as a terminal and the cartridge has been packed with far more powerful processing power.

giancarlostorotoday at 8:17 PM

I lowkey wish Nintendo would rerelease the GBC or GBA I would buy one. They can bake in some games into a few cartridges and make it 100% worth the buy too.

show 2 replies
HeckFecktoday at 8:39 PM

This is the coolest thing I've seen in months. Licence it as beerware, then I'm obliged to owe you one.

Sharlintoday at 6:56 PM

The "Making it work" section seems to abruptly end at the following?

  By modifying the instruction operand!

  2A      ld a, [hl+]
  D6 08   sub a, 8
show 1 reply
villgaxtoday at 6:24 PM

This is why HN exists, almost gives me the same joy as flipping through tech magazines of yester-decades.

jnpnjtoday at 7:04 PM

Always loved using old hardware with recent understandings.

show 1 reply
a_t48today at 6:30 PM

Nice, I’ll have to give this a try on my Analogue Pocket

iLoveOncalltoday at 8:04 PM

Isn't it a bug that when spinning the object the light also spins?

show 1 reply
ndgoldtoday at 6:05 PM

I can’t believe it