Hacker News new | comments | show | ask | jobs | submit login

( Copying my comment from an earlier post: https://news.ycombinator.com/item?id=12921949 )

One tiny thing that might help in your analysis: Nintendo accidentally included all the symbol names and locations on the Wind Waker disc in a file called "framework.map".

Doing some basic demangling on the CodeWarriors names gives you C++ classes and methods:


The "sea" animation is controlled by "daSea" -- "da" meaning "dynamic actor" in Nintendo's naming terminology.

It's extremely unlikely they used texture distortion for the sea effect, since the GPU they used didn't have fragment shaders -- the only method of texture warping is INDTEXMTX, which was only used for the heat effects in Dragon Roost Cavern.

They probably modified UVs directly on their triangular sea mesh.

Smoke effects and such use their in-house particle engine, "JPA".

Technically it is the case that the given fragment shader is doing the same thing as direct UV modification. It doesn't really change the fact that it's texture distortion, it's just that the fragment shader is capable of doing it on a per-pixel basi.

It's a common misconception that the Gamecube doesn't have fragment shaders. The GPU (called the TEV) is almost a straight implementation of DirectX's ps1.0, the same as a GeForce3, with a few extras added.

At my old company I wrote an assembler to read text source and assemble the instructions into TEV format.

I'm aware of TEVs -- I did write http://magcius.github.io/bmdview.js/bmdview.html after all, which compiles TEV back into GL shaders :)

My point was more that TEVs can't modify texture coordinates, since texcoordgen happens before the TEV stage. TEVs only specify how to blend vertex colors, texture samples, game-set registers and lighting results together using configurable formulas.

It's been a while, but I seem to remember there was an additional indirect texture unit for doing just this kind of stuff.

He mentioned this already:

> the only method of texture warping is INDTEXMTX, which was only used for the heat effects in Dragon Roost Cavern

I agree. I wrote a large comment about this over on reddit.


Do any other games have this file included?

Twilight Princess and Pikmin have similar files. I think there are a few other games which have them, but I can't remember which.

Applications are open for YC Summer 2018

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