mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-16 17:05:16 +08:00
Weapon rendering improvements
This commit is contained in:
@@ -637,6 +637,7 @@ namespace CodeWalker.Rendering
|
||||
detltex = itex;
|
||||
break;
|
||||
case ShaderParamNames.TintPaletteSampler:
|
||||
case ShaderParamNames.TextureSamplerDiffPal:
|
||||
tintpal = itex;
|
||||
if (tintpal.Key != null)
|
||||
{
|
||||
@@ -649,6 +650,7 @@ namespace CodeWalker.Rendering
|
||||
isdistmap = true;
|
||||
break;
|
||||
case ShaderParamNames.DiffuseSampler2:
|
||||
case ShaderParamNames.DiffuseExtraSampler:
|
||||
texture2 = itex;
|
||||
break;
|
||||
case ShaderParamNames.heightSampler:
|
||||
@@ -710,6 +712,14 @@ namespace CodeWalker.Rendering
|
||||
case 1229591973://{trees_normal_spec_tnt.sps}
|
||||
if (usetint) tintflag = 2; //use 2nd vertex colour channel for tint...
|
||||
break;
|
||||
case 3267631682: //weapon_normal_spec_detail_tnt.sps
|
||||
case 14185869: //weapon_normal_spec_tnt.sps
|
||||
break; //regular tinting?
|
||||
case 231364109: //weapon_normal_spec_cutout_palette.sps
|
||||
case 3294641629://weapon_normal_spec_detail_palette.sps
|
||||
case 731050667: //weapon_normal_spec_palette.sps
|
||||
if (usetint) { tintflag = 0; pstintflag = 2; } //use diffuse sampler alpha for tint lookup!
|
||||
break;
|
||||
case 3880384844://{decal_spec_only.sps}w
|
||||
case 600733812://{decal_amb_only.sps}
|
||||
case 2842248626://{spec_decal.sps}
|
||||
@@ -799,6 +809,10 @@ namespace CodeWalker.Rendering
|
||||
{
|
||||
tintpal.SetVSResource(context, 0);
|
||||
}
|
||||
if (pstintflag == 2)
|
||||
{
|
||||
tintpal.SetPSResource(context, 6);
|
||||
}
|
||||
|
||||
|
||||
if (geom.BoneTransforms != null)
|
||||
|
||||
Reference in New Issue
Block a user