2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-05-01 16:09:36 +00:00

chore: add base hlsl for IW4

This commit is contained in:
Jan Laupetin
2026-03-24 23:10:36 +01:00
parent 3954c5e923
commit 111b7060df
3 changed files with 167 additions and 2 deletions
@@ -0,0 +1,33 @@
#include "include/IW4.hlsl"
struct VSInput
{
float3 position : POSITION;
half4 color : COLOR0;
half2 texcoord : TEXCOORD0;
};
struct VSOutput
{
float4 position : SV_POSITION;
half4 color : COLOR0;
half2 texcoord : TEXCOORD0;
};
VSOutput VSMain(VSInput vin)
{
VSOutput vout = (VSOutput)0;
vout.position = mul(mul(float4(vin.position, 1.0f), worldMatrix), viewProjectionMatrix);
vout.color = vin.color;
vout.texcoord = vin.texcoord;
return vout;
}
extern sampler2D colorMapSampler;
half4 PSMain(VSOutput input) : SV_TARGET
{
return half4(tex2D(colorMapSampler, input.texcoord)) * input.color;
}