Needed a visualisation to debug a weird depth bug on #dreamcast and ended up with this strange thing (and now I solved my bug, hooray)

Finally got a handle on bumpmapping for 1998 #dreamcast hardware. The basic idea is to simulate realtime light-responsive surface details on relatively simple geometry by providing a 'map' image that describes how light should interact with the surfaces, as if a lot more surface detail were being drawn.

Super detailed geometry would take up more of the limited RAM and needs much more CPU time to calculate lighting and feed into the graphics pipeline every frame. This is just six faces each with four vertices, a non bumpmapped version would need a mesh with thousands of verts.

#gamedev

(edit: spelt 'game' wrong, amazing)

@voxel Not to be confused with parallax mapping! Which is also super cool, but is difficult to make work on a dreamcast.
@nicopap @voxel 2, 3 or 4 layers of the same texture with a height map in the alpha channel. Set alpha-test ref value to different values for each layer. Offset UVs according to dot(view,tangentU) and dot(view,tangentV). Works great.
@TomF @nicopap @voxel How old is this technique? It sounds like it could work all the way back to OpenGL 1.x
@mirth @nicopap @voxel I first heard about it implemented in the very first Unreal Engine (might have been Corrinne Yu?), which was software-rendered, so... :-)
@TomF
It also was an example stone floor material in the starter content of UE4 (and probably also UE5 until they changed the starter content strategy recently). Just not with 3-4 layers, but more like 8-12 layers or something. When I first saw that it looked like magic, and the results are really clear!
@mirth @nicopap @voxel