Implemented a lights editor in model viewer

This commit is contained in:
Skylumz
2021-12-29 17:17:31 -05:00
Unverified
parent 42f0e95c7c
commit 0c62a04625
11 changed files with 3251 additions and 246 deletions
+4 -2
View File
@@ -330,7 +330,7 @@ namespace CodeWalker.Rendering
{
var rlight = new RenderableLight();
rlight.Owner = this;
rlight.Init(ref lights[i]);
rlight.Init(lights[i]);
rlights[i] = rlight;
}
Lights = rlights;
@@ -1353,6 +1353,7 @@ namespace CodeWalker.Rendering
public class RenderableLight
{
public LightAttributes OwnerLight;
public Renderable Owner;
public Vector3 Position;
public Vector3 Colour;
@@ -1371,8 +1372,9 @@ namespace CodeWalker.Rendering
public uint TimeFlags;
public MetaHash TextureHash;
public void Init(ref LightAttributes_s l)
public void Init(LightAttributes l)
{
OwnerLight = l;
var pos = l.Position;
var dir = l.Direction;
var tan = l.Tangent;