Nico de Poel
314b52e99e
Added a separate CLUT for transparent surfaces, and set semi-transparency mode on water polygons.
3 years ago
Nico de Poel
b1e568e5c3
Added check to backface culling to see if the face is behind the camera.
This will be required if we ditch depth-based culling in favor of leaf-based depth.
Also makes for a nice speed boost in some scenarios already.
3 years ago
Nico de Poel
76a6dc92d5
First pass at implementing texturing of face polygons.
Not quite right yet but things are starting to work.
3 years ago
Nico de Poel
ddffc8860e
Fixes to make things work on real hardware again:
- Struct pointers need to be 32-bit aligned, otherwise the PS1 will crash
- For this purpose, some structs have been padded to make them a multiple of 4 bytes in size
- Vector data needs to be copied into scratch RAM at a 32-bit aligned address
3 years ago
Nico de Poel
b7da18d0c8
First bits of code involving BSP traversal with front/back selection and math: determine the leaf that the camera is currently in.
3 years ago
Nico de Poel
c5783982e1
Added a more aggressive inlining macro. Not sure if it makes any difference now, but it's nice to have the option.
3 years ago
Nico de Poel
a68b2c370f
Set up some helper functions for memory management, including scratchpad memory. Moved the primitive buffer here too.
This will probably have to become inline functions or macros at some point, but for now it's just pure C.
3 years ago
Nico de Poel
5a3b6aac46
First implementation of world loading and rendering. No BSP logic or optimizations in here yet, but something is being displayed!
3 years ago
Nico de Poel
ea44f4e99c
First import, with bits of code taken from the MDL viewer prototype, split up into organized units.
3 years ago