Open aybe opened 8 years ago
Hi !
I think I'm on something, 0x15 seems to be a parallel light source (see PDF), hex-edited the game and it seems coherent:
// 0x15 struct
polygonHeader
directionalVector = vec4I16
bgrxColor = uint32
see where I've assigned 1 color component only on each light:
cheers :dancers:
100% confirmed these are the light sources as said in the SDK.
Looking on finding out more about 0x16 now ...
Okay I think we've solved the CLASS.PRM case !
case PrmPolygonType.AmbientLight: // 0x16
var ambientLight = new AmbientLight
{
Header = header,
Unknown1 = reader.ReadUInt32BEs(4),
Color = reader.ReadUInt32BE(),
Unknown2 = reader.ReadUInt32BE()
};
Basically the PSX SDK is of great help, main difference lies in how things are laid out.
Would have loved to implement correct coloring but looking at current code base I don't have much clue without breaking current logic ... would be great if you had some idea about it.
By the way, I have a question for you !
On PRM files there are many objects and some depends on others, some are totally independent. Do you have any suggestion/idea on what system/pattern I could sketch in order to be able to have separate objects, knowing the structure of PRMs ? In short I'm asking you what approach you'd use to be able to use these objects separately, knowing the possible dependencies between them ?
Thank you, and have a good night !!
Hi,
Implemented it here and it's mostly that, shader should be modified though:
Btw, colors are RGB in lights, so one should ignore A component.
Cheers!
It's been a while I was looking for it :dancer: !!!
Will post details once it's a bit more refined but basically I found that there are command lists that should be ignored and that there are new Gouraud-shaded polygons (tri/quad).