2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-04-21 10:58:44 +00:00

chore: add and fixup hlsl game defs for iw3,iw4,iw5,t5

This commit is contained in:
Jan Laupetin
2026-04-08 11:15:48 +01:00
parent 388c0272b0
commit b90feffe14
8 changed files with 651 additions and 61 deletions

View File

@@ -2,14 +2,35 @@
// IW4 code constants
// =============================
extern float4 baseLightingCoords;
extern float4 lightprobeAmbient;
extern float4 fullscreenDistortion;
extern float4 fadeEffect;
extern float4 lightingLookupScale;
extern float4 debugBumpmap;
extern float4 lightPosition;
extern float4 lightDiffuse;
extern float4 lightSpecular;
extern float4 lightSpotDir;
extern float4 lightSpotFactors;
extern float4 lightFalloffPlacement;
extern float4 particleCloudColor;
extern float4 gameTime;
extern float4 pixelCostFracs;
extern float4 pixelCostDecode;
extern float4 filterTap[8];
extern float4 colorMatrixR;
extern float4 colorMatrixG;
extern float4 colorMatrixB;
extern float4 shadowmapPolygonOffset;
extern float4 renderTargetSize;
extern float4 dofEquationViewModelAndFarBlur;
extern float4 dofEquationScene;
extern float4 dofLerpScale;
extern float4 dofLerpBias;
extern float4 dofRowDelta;
extern float4 motionMatrixX;
extern float4 motionMatrixY;
extern float4 motionMatrixW;
extern float4 shadowmapSwitchPartition;
extern float4 shadowmapScale;
extern float4 zNear;
extern float4 lightingLookupScale;
extern float4 debugBumpmap;
extern float4 materialColor;
extern float4 fogConsts;
extern float4 fogColorLinear;
@@ -20,35 +41,25 @@ extern float4 fogSunColorGamma;
extern float4 fogSunDir;
extern float4 glowSetup;
extern float4 glowApply;
extern float4 filterTap[8];
extern float4 codeMeshArg[2];
extern float4 renderTargetSize;
extern float4 shadowmapSwitchPartition;
extern float4 shadowmapScale;
extern float4 shadowmapPolygonOffset;
extern float4 zNear;
extern float4 clipSpaceLookupScale;
extern float4 clipSpaceLookupOffset;
extern float4 dofEquationViewModelAndFarBlur;
extern float4 dofEquationScene;
extern float4 dofLerpScale;
extern float4 dofLerpBias;
extern float4 dofRowDelta;
extern float4 depthFromClip;
extern float4 outdoorFeatherParms;
extern float4 envMapParms;
extern float4 colorMatrixR;
extern float4 colorMatrixG;
extern float4 colorMatrixB;
extern float4 colorBias;
extern float4 colorTintBase;
extern float4 colorTintDelta;
extern float4 colorTintQuadraticDelta;
extern float4 motionMatrixX;
extern float4 motionMatrixY;
extern float4 motionMatrixW;
extern float4 gameTime;
extern float4 particleCloudColor;
extern float4 outdoorFeatherParms;
extern float4 envMapParms;
extern float4 sunShadowmapPixelAdjust;
extern float4 spotShadowmapPixelAdjust;
extern float4 fullscreenDistortion;
extern float4 fadeEffect;
extern float4 viewportDimensions;
extern float4 framebufferRead;
extern float4 baseLightingCoords;
extern float4 lightprobeAmbient;
extern float4 nearPlaneOrg;
extern float4 nearPlaneDx;
extern float4 nearPlaneDy;
extern float4 clipSpaceLookupScale;
extern float4 clipSpaceLookupOffset;
extern float4 particleCloudMatrix;
extern float4 particleCloudMatrix1;
extern float4 particleCloudMatrix2;
@@ -57,23 +68,8 @@ extern float4 particleCloudSparkColor1;
extern float4 particleCloudSparkColor2;
extern float4 particleFountainParms0;
extern float4 particleFountainParms1;
extern float4 viewportDimensions;
extern float4 framebufferRead;
extern float4 nearPlaneOrg;
extern float4 nearPlaneDx;
extern float4 nearPlaneDy;
extern float4 lightPosition;
extern float4 lightDiffuse;
extern float4 lightSpecular;
extern float4 lightSpotDir;
extern float4 lightSpotFactors;
extern float4 lightFalloffPlacement;
extern float4 sunShadowmapPixelAdjust;
extern float4 spotShadowmapPixelAdjust;
extern float4 depthFromClip;
extern float4 codeMeshArg[2];
extern float4x4 viewMatrix;
extern float4x4 inverseViewMatrix;
extern float4x4 transposeViewMatrix;
@@ -130,3 +126,31 @@ extern float4x4 worldViewProjectionMatrix2;
extern float4x4 inverseWorldViewProjectionMatrix2;
extern float4x4 transposeWorldViewProjectionMatrix2;
extern float4x4 inverseTransposeWorldViewProjectionMatrix2;
extern sampler2D black;
extern sampler2D white;
extern sampler2D identityNormalMap;
extern sampler2D modelLightingSampler;
extern sampler2D lightmapSamplerPrimary;
extern sampler2D lightmapSamplerSecondary;
extern sampler2D shadowmapSamplerSun;
extern sampler2D shadowmapSamplerSpot;
extern sampler2D feedbackSampler;
extern sampler2D resolvedPostSun;
extern sampler2D resolvedScene;
extern sampler2D postEffect0;
extern sampler2D postEffect1;
extern sampler2D attenuationSampler;
extern sampler2D outdoor;
extern sampler2D floatZSampler;
extern sampler2D processedFloatZSampler;
extern sampler2D rawFloatZSampler;
extern sampler2D halfParticleColorSampler;
extern sampler2D halfParticleDepthSampler;
extern sampler2D caseTexture;
extern sampler2D cinematicYSampler;
extern sampler2D cinematicCrSampler;
extern sampler2D cinematicCbSampler;
extern sampler2D cinematicASampler;
extern sampler2D reflectionProbeSampler;
extern sampler2D alternateSceneSampler;

View File

@@ -30,7 +30,7 @@
vertexShader 3.0 VERTEX_SHADER
{
worldViewProjectionMatrix = constant.transposeWorldViewProjectionMatrix;
worldViewProjectionMatrix = constant.worldViewProjectionMatrix;
#ifdef UV_ANIM
uvAnimParms = material.uvAnimParms;
#endif

View File

@@ -48,17 +48,17 @@
vertexShader 3.0 VERTEX_SHADER
{
worldViewMatrix = constant.transposeWorldViewMatrix;
worldViewMatrix = constant.worldViewMatrix;
#if MODE == "spark"
worldViewMatrix1 = constant.transposeWorldViewMatrix1;
worldViewMatrix2 = constant.transposeWorldViewMatrix2;
worldViewMatrix1 = constant.worldViewMatrix1;
worldViewMatrix2 = constant.worldViewMatrix2;
#endif
#ifdef OUTDOOR
worldOutdoorLookupMatrix = constant.transposeWorldOutdoorLookupMatrix;
worldOutdoorLookupMatrix = constant.worldOutdoorLookupMatrix;
#endif
projectionMatrix = constant.transposeProjectionMatrix;
projectionMatrix = constant.projectionMatrix;
#ifdef SPOT
inverseViewMatrix = constant.inverseTransposeViewMatrix;
inverseViewMatrix = constant.inverseViewMatrix;
#endif
}
@@ -72,10 +72,10 @@
shadowmapSamplerSpot = sampler.shadowmapSpot;
#endif
#ifdef SPOT
lightSpotDir = constant.light.spotDir;
lightSpotFactors = constant.light.spotFactors;
lightPosition = constant.light.position;
lightDiffuse = constant.light.diffuse;
lightSpotDir = constant.lightSpotDir;
lightSpotFactors = constant.lightSpotFactors;
lightPosition = constant.lightPosition;
lightDiffuse = constant.lightDiffuse;
#endif
}

View File

@@ -3,8 +3,6 @@
vertexShader 3.0 "trivial_vertcol_simple.hlsl"
{
worldMatrix = constant.transposeWorldMatrix;
viewProjectionMatrix = constant.transposeViewProjectionMatrix;
}
pixelShader 3.0 "trivial_vertcol_simple.hlsl"