gm-matthew
483dbdda2e
Add LOD switching and blending out culling nodes
...
We're not blending between LODs yet as we're not sure of the best way to implement it
Also implementing control bits for disable culling and enable model scale (needed for ECA and Harley)
2023-11-02 14:16:07 +00:00
Ian Curtis
6595b9320e
Rewrite the renderer a bit to spit out the finished graphics from the 3d chip on separate buffers. One buffer is for opaque pixels, and 2 more for translucent pixels. Before the frame was composited on the back buffer, which meant the tilegen had to have been drawn first. This way the images are now totally independant of the tilegen chip so can be drawn as soon as the register write 0xC is written to the tilegen.
...
Some games update the tilegen after the ping_ping bit has flipped at 66% of the frame, so we need to split the tilegen drawing up into two stages to get some effects to work. So having the tilegen draw independantly of the 3d chip can make this happen.
2023-10-14 20:05:00 +01:00
Ian Curtis
9aa3f13777
We were force normalising the result of matrix * normal, which looked correct in most cases. But this didn't preserve the scaling of the matrix, or the scaling of the model normals which resulted in many over bright areas. On it's own this generally worked, but games like Star Wars looked quite broken. Harry correctly figured out if you scale these normals by the scaling value that is sometimes present in the culling nodes the lighting looks correct. Still more work to do to correctly figure out the model3's lighting model.
2017-07-29 16:30:30 +00:00
Ian Curtis
c2b1db11f8
Cull geometry based on the culling distances in the nodes. Should give some sort of speedup on lower end pcs where the CPU is predominantly the bottle neck.
2016-06-16 20:05:29 +00:00
Ian Curtis
48a79a8f14
cleaning
2016-06-10 10:18:47 +00:00
Ian Curtis
36074d9fd5
Y texture offsets are just 5 bits. Texture coordinate wrap around happens in the same texture sheet, not into the next one. Fixes various texturing bugs in sega rally.
2016-05-30 13:25:00 +00:00
Bart Trzynadlowski
34301e97e1
Adding new 3D engine by Ian Curtis. Old engine moved to Graphics/Legacy3D/.
2016-03-21 04:10:14 +00:00