mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-15 03:04:49 +08:00
FBX importer v1, fix for YNDs DLC loading, fix for renamed NG encrypted RPFs, RelFile MetaNames addition
This commit is contained in:
+6
-10
@@ -238,7 +238,7 @@ namespace CodeWalker.Rendering
|
||||
if (hastransforms)
|
||||
{
|
||||
|
||||
int boneidx = (int)((model.Unk28h >> 24) & 0xFF);
|
||||
int boneidx = (int)((model.SkeletonBinding >> 24) & 0xFF);
|
||||
|
||||
Matrix trans = (boneidx < modeltransforms.Length) ? modeltransforms[boneidx] : Matrix.Identity;
|
||||
Bone bone = (hasbones && (boneidx < bones.Count)) ? bones[boneidx] : null;
|
||||
@@ -267,7 +267,7 @@ namespace CodeWalker.Rendering
|
||||
}
|
||||
}
|
||||
|
||||
if (((model.Unk28h >> 8) & 0xFF) > 0) //skin mesh?
|
||||
if (((model.SkeletonBinding >> 8) & 0xFF) > 0) //skin mesh?
|
||||
{
|
||||
model.Transform = Matrix.Identity;
|
||||
}
|
||||
@@ -337,20 +337,16 @@ namespace CodeWalker.Rendering
|
||||
public AABB_s[] GeometryBounds;
|
||||
public long GeometrySize { get; private set; }
|
||||
|
||||
public uint Unk4h;
|
||||
public uint Unk14h;
|
||||
public uint Unk28h;
|
||||
public uint Unk2Ch; //flags.......
|
||||
public uint SkeletonBinding;
|
||||
public uint RenderMaskFlags; //flags.......
|
||||
|
||||
public bool UseTransform;
|
||||
public Matrix Transform;
|
||||
|
||||
public void Init(DrawableModel dmodel)
|
||||
{
|
||||
Unk4h = dmodel.Unknown_4h;
|
||||
Unk14h = dmodel.Unknown_14h;
|
||||
Unk28h = dmodel.Unknown_28h;
|
||||
Unk2Ch = dmodel.Unknown_2Ch; //only the first byte of Unknown_2Ch seems be related to this
|
||||
SkeletonBinding = dmodel.SkeletonBinding;//4th byte is bone index, 2nd byte for skin meshes
|
||||
RenderMaskFlags = dmodel.RenderMaskFlags; //only the first byte seems be related to this
|
||||
|
||||
|
||||
DrawableModel = dmodel;
|
||||
|
||||
@@ -1904,7 +1904,7 @@ namespace CodeWalker.Rendering
|
||||
private bool RenderIsModelFinalRender(RenderableModel model)
|
||||
{
|
||||
|
||||
if ((model.Unk2Ch & 1) == 0) //smallest bit is proxy/"final render" bit? seems to work...
|
||||
if ((model.RenderMaskFlags & 1) == 0) //smallest bit is proxy/"final render" bit? seems to work...
|
||||
{
|
||||
return renderproxies;
|
||||
}
|
||||
|
||||
@@ -739,7 +739,7 @@ namespace CodeWalker.Rendering
|
||||
{
|
||||
var shader = geom.Geom.DrawableGeom.Shader;
|
||||
|
||||
var b = (shader!=null) ? shader.Unknown_11h : 0; //rage render bucket?
|
||||
var b = (shader!=null) ? shader.RenderBucket : 0; //rage render bucket?
|
||||
|
||||
var bucket = EnsureRenderBucket(b);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user