mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-16 02:15:09 +08:00
Fix for hair rendering, update peds meta types to be expandable objects
This commit is contained in:
@@ -743,6 +743,8 @@ namespace CodeWalker.Rendering
|
||||
public bool HDTextureEnable = true;
|
||||
public bool globalAnimUVEnable = false;
|
||||
public ClipMapEntry ClipMapEntryUV = null;
|
||||
public bool isHair = false;
|
||||
public bool disableRendering = false;
|
||||
|
||||
public static ShaderParamNames[] GetTextureSamplerList()
|
||||
{
|
||||
@@ -854,6 +856,9 @@ namespace CodeWalker.Rendering
|
||||
case 600733812://{decal_amb_only.sps}
|
||||
SpecOnly = true; //this needs more work.
|
||||
break;
|
||||
case 100720695://{ped_hair_spiked.sps}
|
||||
isHair = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -942,6 +947,10 @@ namespace CodeWalker.Rendering
|
||||
case ShaderParamNames.DirtDecalMask:
|
||||
DirtDecalMask = ((Vector4)param.Data);
|
||||
break;
|
||||
case ShaderParamNames.orderNumber:
|
||||
//stops drawing hair geoms that apparently shouldn't be rendered... any better way to do this?
|
||||
if (isHair && (((Vector4)param.Data).X > 0.0f)) disableRendering = true;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2652,6 +2652,11 @@ namespace CodeWalker.Rendering
|
||||
if (SelectionGeometryDrawFlags.ContainsKey(dgeom))
|
||||
{ continue; } //filter out geometries in selected item that aren't flagged for drawing.
|
||||
}
|
||||
else
|
||||
{
|
||||
if (geom.disableRendering)
|
||||
{ continue; } //filter out certain geometries like certain hair parts that shouldn't render by default
|
||||
}
|
||||
|
||||
rginst.Geom = geom;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user