mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2025-01-10 15:19:39 +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 LightInstance[] Lights { get; set; }
|
||||||
|
//public uint[] LightHashTest { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public string Name
|
public string Name
|
||||||
@ -2096,12 +2097,12 @@ namespace CodeWalker.GameFiles
|
|||||||
}
|
}
|
||||||
if (lightAttrs == null) return;
|
if (lightAttrs == null) return;
|
||||||
|
|
||||||
var abmin = Vector3.Min(Archetype.BBMin, db.BoundingBoxMin);
|
var abmin = db.BoundingBoxMin;
|
||||||
var abmax = Vector3.Max(Archetype.BBMax, db.BoundingBoxMax);
|
var abmax = db.BoundingBoxMax;
|
||||||
if (b != null)
|
if (b != null)
|
||||||
{
|
{
|
||||||
abmin = Vector3.Min(abmin, b.BoxMin);
|
abmin = b.BoxMin;
|
||||||
abmax = Vector3.Max(abmax, b.BoxMax);
|
abmax = b.BoxMax;
|
||||||
}
|
}
|
||||||
var bb = new BoundingBox(abmin, abmax).Transform(Position, Orientation, Scale);
|
var bb = new BoundingBox(abmin, abmax).Transform(Position, Orientation, Scale);
|
||||||
var ints = new uint[7];
|
var ints = new uint[7];
|
||||||
@ -2126,6 +2127,13 @@ namespace CodeWalker.GameFiles
|
|||||||
}
|
}
|
||||||
Lights = lightInsts;
|
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