I really love that game. I thoroughly enjoyed finding all the collectible bits, and loved the visuals. What a gorgeous game! I hope you're playing it with a good gamepad and not keyboard/mouse grin

I remember also wondering about how they did all the nice texture blending and decals, and I have a few ideas. PoP probably would've used a mixture of them (and perhaps some other tricks).

One is to split the world into individual meshes that only have a few different textures to be blended. Since normals are typically pre-calculated, vertices along seams can have the same normals and make it appear to be one giant mesh.

The other is the decal system -- I've never used GS decals (or any other engine's, for that matter). But it makes sense to render the decals immediately after rendering the world or whatever surface they're supposed to be projected on, with a depth offset to prevent z-fighting. A more-precise but perhaps less-practical method would be to have each decal's mesh precisely matching the faces it is being projected on and its origin matching that of the mesh it is being projected on so that they have the exact same transformation matrices (EDIT: this part may not be necessary with fixed-point coordinates like in GS, but I guess it depends on some lower level stuff I haven't learned about yet). Then as long as the depth-test allows a pixel to be rendered if its of EQUAL depth to what's already there, the decal gets rendered nicely over the surface beneath it. I can't recall exactly where, but I do recall seeing some indication that the PoP decals aren't quite that precise, so they probably do something like the former. GS appears to just use a bit of an offset, which I've only just learned now from the manual.

Are decals in GS that slow?

Last edited by JibbSmart; 04/29/12 23:21. Reason: I don't know some stuff

Formerly known as JulzMighty.
I made KarBOOM!