Fix for hair rendering, update peds meta types to be expandable objects

This commit is contained in:
dexy
2019-11-08 14:22:10 +11:00
Unverified
parent 12c8fca74e
commit 9fc219e332
3 changed files with 41 additions and 27 deletions
+9
View File
@@ -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;
}
}
+5
View File
@@ -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;