mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2025-01-09 23:03:27 +08:00
Light hash calculation using correct bounding boxes
This commit is contained in:
parent
7b628aeab2
commit
12dd40ea8e
@ -1682,6 +1682,7 @@ namespace CodeWalker.GameFiles
|
||||
|
||||
|
||||
public LightInstance[] Lights { get; set; }
|
||||
//public uint[] LightHashTest { get; set; }
|
||||
|
||||
|
||||
public string Name
|
||||
@ -2096,12 +2097,12 @@ namespace CodeWalker.GameFiles
|
||||
}
|
||||
if (lightAttrs == null) return;
|
||||
|
||||
var abmin = Vector3.Min(Archetype.BBMin, db.BoundingBoxMin);
|
||||
var abmax = Vector3.Max(Archetype.BBMax, db.BoundingBoxMax);
|
||||
var abmin = db.BoundingBoxMin;
|
||||
var abmax = db.BoundingBoxMax;
|
||||
if (b != null)
|
||||
{
|
||||
abmin = Vector3.Min(abmin, b.BoxMin);
|
||||
abmax = Vector3.Max(abmax, b.BoxMax);
|
||||
abmin = b.BoxMin;
|
||||
abmax = b.BoxMax;
|
||||
}
|
||||
var bb = new BoundingBox(abmin, abmax).Transform(Position, Orientation, Scale);
|
||||
var ints = new uint[7];
|
||||
@ -2126,6 +2127,13 @@ namespace CodeWalker.GameFiles
|
||||
}
|
||||
Lights = lightInsts;
|
||||
|
||||
//LightHashTest = new uint[25];
|
||||
//for (int i = 0; i < 25; i++)
|
||||
//{
|
||||
// ints[6] = (uint)(i);
|
||||
// LightHashTest[i] = ComputeLightHash(ints);
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user