mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-19 15:52:53 +00:00
Add template for distortion_scale techniques
This commit is contained in:
parent
8f44a022a2
commit
840749b71f
54
raw/iw4/techniques/distortion_scale.tech.template
Normal file
54
raw/iw4/techniques/distortion_scale.tech.template
Normal file
@ -0,0 +1,54 @@
|
||||
#pragma switch UV_ANIM
|
||||
#pragma switch ZFEATHER
|
||||
#pragma switch DTEX
|
||||
|
||||
#ifdef UV_ANIM
|
||||
#define UV_ANIM_SUFFIX "_ua"
|
||||
#else
|
||||
#define UV_ANIM_SUFFIX ""
|
||||
#endif
|
||||
|
||||
#ifdef ZFEATHER
|
||||
#define ZFEATHER_SUFFIX "_zfeather"
|
||||
#else
|
||||
#define ZFEATHER_SUFFIX ""
|
||||
#endif
|
||||
|
||||
#ifdef DTEX
|
||||
#define DTEX_SUFFIX "_dtex"
|
||||
#else
|
||||
#define DTEX_SUFFIX ""
|
||||
#endif
|
||||
|
||||
#pragma filename "distortion_scale" + UV_ANIM_SUFFIX + ZFEATHER_SUFFIX + DTEX_SUFFIX + ".tech"
|
||||
|
||||
#set VERTEX_SHADER "distortion_scale" + UV_ANIM_SUFFIX + ZFEATHER_SUFFIX + DTEX_SUFFIX + ".hlsl"
|
||||
#set PIXEL_SHADER "distortion" + ZFEATHER_SUFFIX + ".hlsl"
|
||||
|
||||
{
|
||||
stateMap "default";
|
||||
|
||||
vertexShader 3.0 "VERTEX_SHADER"
|
||||
{
|
||||
worldViewProjectionMatrix = constant.transposeWorldViewProjectionMatrix;
|
||||
#ifdef UV_ANIM
|
||||
uvAnimParms = material.uvAnimParms;
|
||||
#endif
|
||||
distortionScale = material.distortionScale;
|
||||
}
|
||||
|
||||
pixelShader 3.0 "PIXEL_SHADER"
|
||||
{
|
||||
normalMapSampler = material.colorMap;
|
||||
colorMapSampler = sampler.resolvedPostSun;
|
||||
#ifdef ZFEATHER
|
||||
floatZSampler = sampler.floatZ;
|
||||
#endif
|
||||
}
|
||||
|
||||
vertex.position = code.position;
|
||||
vertex.color[0] = code.color;
|
||||
vertex.texcoord[0] = code.texcoord[0];
|
||||
vertex.normal = code.normal;
|
||||
vertex.texcoord[1] = code.tangent;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user