Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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...





It's not that different from "real 3d" renderers. Especially in deferred rendering pipelines the rasterizer creates a bunch of buffers for depth map, normal map, color, etc but main shaders are running on those 2d buffers. That's the beauty of it parts operating with 3d triangles are kept simple simple and the expensive lighting shaders run once on flat 2d images with 0 overdraw. The shaders don't care whether normal map buffer came from 3d geometry which was rasterized just now, prerendered some time ago or the mix of 2. And even in forward rendering pipelines the fragment shader is operating on implicit 2d pixels created by vertex shaders and rasterizer from "real 3d" data.

The way I look at it if the input and math in the shader is working with 3d vectors its a 3d shader. Whether there is also a 3d rasterizer is a separate question.

Modern 3d games are exploiting it in many different ways. Prerendering a 3D model from multiple views might sound like cheating but use of imposters is a real technique used by proper 3d engines.


There's a GBDK demo that actually does something similar (spinning 2D imposters). Does not handle the lighting though, which is quite impressive.

https://github.com/gbdk-2020/gbdk-2020/tree/develop/gbdk-lib...

Unfortunately, the 2D imposter mode has pretty significant difficulties with arbitrarily rotated 3D. The GBDK imposter rotation demo needs a 256k cart just to handle 64 rotation frames in a circle for a single object. Expanding that out to fully 3D views and rotations gets quite prohibitive.

Haven't tried downloading RGDBS to compile this yet. However, suspect the final file is probably similar, and pushing the upper limits on GB cart sizes.


Well, Cannon Fodder for the GBC it's 1 MB big, and the rest such as Metal Gear and Alone in the Dark are pretty sized for the hardware.

It’s a shader, not a renderer. The images are pre-rendered, but the shading is done in real time.

⇒ I think they’re correct in calling this a 3D shader.


It's not that different from how some creative Mac games were doing 3d lighting on 2d textures prior to 3d accelerated hardware being available. The neat part here is that it runs on a Gameboy Colour.

On a device that apparently doesn't even support floating point operations and doesn't support multiplication. Super cool.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: