mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-07 21:38:01 -05:00
Add statemap raw files for iw4
This commit is contained in:
parent
364d801d3f
commit
403d7f2c44
@ -112,6 +112,7 @@ include "src/ZoneCommon.lua"
|
|||||||
include "src/ObjCommon.lua"
|
include "src/ObjCommon.lua"
|
||||||
include "src/ObjLoading.lua"
|
include "src/ObjLoading.lua"
|
||||||
include "src/ObjWriting.lua"
|
include "src/ObjWriting.lua"
|
||||||
|
include "tools/scripts/raw.lua"
|
||||||
|
|
||||||
-- Components group: All projects assist or are part of a tool
|
-- Components group: All projects assist or are part of a tool
|
||||||
group "Components"
|
group "Components"
|
||||||
@ -136,6 +137,10 @@ group "Tools"
|
|||||||
ZoneCodeGenerator:project()
|
ZoneCodeGenerator:project()
|
||||||
group ""
|
group ""
|
||||||
|
|
||||||
|
group "Raw"
|
||||||
|
Raw:project()
|
||||||
|
group ""
|
||||||
|
|
||||||
-- ========================
|
-- ========================
|
||||||
-- Tests
|
-- Tests
|
||||||
-- ========================
|
-- ========================
|
||||||
|
66
raw/iw4/statemaps/additive.sm
Normal file
66
raw/iw4/statemaps/additive.sm
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == InvSrcAlpha:
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == One:
|
||||||
|
GT0;
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Add, InvDestAlpha, One;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
mtlDepthTest == LessEqual && mtlDestBlend == Zero:
|
||||||
|
Equal;
|
||||||
|
mtlDepthTest == LessEqual:
|
||||||
|
LessEqual;
|
||||||
|
default:
|
||||||
|
Equal;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Enable, Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
68
raw/iw4/statemaps/additive_stencil.sm
Normal file
68
raw/iw4/statemaps/additive_stencil.sm
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == InvSrcAlpha:
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == One:
|
||||||
|
GT0;
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Add, InvDestAlpha, One;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
mtlDepthTest == LessEqual && mtlDestBlend == Zero:
|
||||||
|
Equal;
|
||||||
|
mtlDepthTest == LessEqual:
|
||||||
|
LessEqual;
|
||||||
|
default:
|
||||||
|
Equal;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Enable, Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
OneSided,
|
||||||
|
Equal, Keep, Keep, Keep,
|
||||||
|
Always, Keep, Keep, Keep;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
59
raw/iw4/statemaps/build_floatz.sm
Normal file
59
raw/iw4/statemaps/build_floatz.sm
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Always;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Enable, Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
63
raw/iw4/statemaps/build_shadowmap.sm
Normal file
63
raw/iw4/statemaps/build_shadowmap.sm
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Always;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
mtlCullFace == Back:
|
||||||
|
Front;
|
||||||
|
mtlCullFace == None:
|
||||||
|
None;
|
||||||
|
mtlCullFace == Front:
|
||||||
|
Back;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Enable, Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
59
raw/iw4/statemaps/build_shadowmap_color.sm
Normal file
59
raw/iw4/statemaps/build_shadowmap_color.sm
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
None;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Enable, Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
59
raw/iw4/statemaps/build_shadowmap_depth.sm
Normal file
59
raw/iw4/statemaps/build_shadowmap_depth.sm
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
None;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
shadowmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
59
raw/iw4/statemaps/build_shadowmap_model.sm
Normal file
59
raw/iw4/statemaps/build_shadowmap_model.sm
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
shadowmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
61
raw/iw4/statemaps/clear_alpha_stencil.sm
Normal file
61
raw/iw4/statemaps/clear_alpha_stencil.sm
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Always;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Back;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
0;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
OneSided,
|
||||||
|
Always, Zero, Zero, Zero,
|
||||||
|
Always, Zero, Zero, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
59
raw/iw4/statemaps/color_only.sm
Normal file
59
raw/iw4/statemaps/color_only.sm
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Always;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Back;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
LessEqual;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Enable, Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
0;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
68
raw/iw4/statemaps/default.sm
Normal file
68
raw/iw4/statemaps/default.sm
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == InvSrcAlpha:
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == One:
|
||||||
|
GT0;
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
mtlBlendOp == Disable:
|
||||||
|
Disable, One, Zero;
|
||||||
|
default:
|
||||||
|
Add, InvDestAlpha, One;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
mtlBlendOp == Disable:
|
||||||
|
Enable;
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
mtlPolygonOffset == 0:
|
||||||
|
Enable, Enable;
|
||||||
|
default:
|
||||||
|
Enable, Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
68
raw/iw4/statemaps/default2d.sm
Normal file
68
raw/iw4/statemaps/default2d.sm
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == InvSrcAlpha:
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == One:
|
||||||
|
GT0;
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
mtlBlendOp == Disable:
|
||||||
|
Disable, One, Zero;
|
||||||
|
default:
|
||||||
|
Add, InvDestAlpha, One;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
mtlPolygonOffset == 0:
|
||||||
|
Enable, Enable;
|
||||||
|
default:
|
||||||
|
Enable, Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
0;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable,
|
||||||
|
Always, Keep, Keep, Keep,
|
||||||
|
Always, Keep, Keep, Keep;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
64
raw/iw4/statemaps/effect_add.sm
Normal file
64
raw/iw4/statemaps/effect_add.sm
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == InvSrcAlpha:
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == One:
|
||||||
|
GT0;
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
mtlBlendOp == Disable:
|
||||||
|
Enable;
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Enable, Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
66
raw/iw4/statemaps/multiply_fog.sm
Normal file
66
raw/iw4/statemaps/multiply_fog.sm
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == InvSrcAlpha:
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == One:
|
||||||
|
GT0;
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Add, One, One;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
mtlBlendOp == Disable:
|
||||||
|
Enable;
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
mtlBlendOp == Disable:
|
||||||
|
Enable, Enable;
|
||||||
|
default:
|
||||||
|
Enable, Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
64
raw/iw4/statemaps/nocolor.sm
Normal file
64
raw/iw4/statemaps/nocolor.sm
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == InvSrcAlpha:
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == One:
|
||||||
|
GT0;
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
mtlBlendOp == Disable:
|
||||||
|
Enable;
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
59
raw/iw4/statemaps/objective.sm
Normal file
59
raw/iw4/statemaps/objective.sm
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Add, SrcAlpha, One;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Back;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
LessEqual;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Enable, Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
59
raw/iw4/statemaps/passthrough.sm
Normal file
59
raw/iw4/statemaps/passthrough.sm
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
59
raw/iw4/statemaps/pixel_cost_add.sm
Normal file
59
raw/iw4/statemaps/pixel_cost_add.sm
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Always;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Add, One, One;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Enable, Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
68
raw/iw4/statemaps/premulalpha.sm
Normal file
68
raw/iw4/statemaps/premulalpha.sm
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == InvSrcAlpha:
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == One:
|
||||||
|
GT0;
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Add, One, InvSrcAlpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
mtlBlendOp == Disable:
|
||||||
|
Disable, One, Zero;
|
||||||
|
default:
|
||||||
|
Add, InvDestAlpha, One;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
mtlBlendOp == Disable:
|
||||||
|
Enable;
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
mtlPolygonOffset == 0:
|
||||||
|
Enable, Enable;
|
||||||
|
default:
|
||||||
|
Enable, Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
59
raw/iw4/statemaps/shadowcookie_receiver.sm
Normal file
59
raw/iw4/statemaps/shadowcookie_receiver.sm
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Add, Zero, InvSrcColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
LessEqual;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Enable, Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
2;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
61
raw/iw4/statemaps/wireframe.sm
Normal file
61
raw/iw4/statemaps/wireframe.sm
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Always;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Back;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
LessEqual;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Enable, Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
2;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable,
|
||||||
|
Always, Zero, Zero, Zero,
|
||||||
|
Always, Zero, Zero, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Enable;
|
||||||
|
}
|
64
raw/iw4/statemaps/zfeather_add.sm
Normal file
64
raw/iw4/statemaps/zfeather_add.sm
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
alphaTest
|
||||||
|
{
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == InvSrcAlpha:
|
||||||
|
mtlAlphaTest == Always && mtlBlendOp == Add && mtlSrcBlend == SrcAlpha && mtlDestBlend == One:
|
||||||
|
GT0;
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
blendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
separateAlphaBlendFunc
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable, One, Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
cullFace
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthTest
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
depthWrite
|
||||||
|
{
|
||||||
|
mtlSrcBlend == One && mtlDestBlend == Zero:
|
||||||
|
Enable;
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
colorWrite
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Enable, Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
polygonOffset
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
stencil
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
passthrough;
|
||||||
|
}
|
||||||
|
|
||||||
|
wireframe
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
Disable;
|
||||||
|
}
|
@ -19,6 +19,11 @@ function TestFolder()
|
|||||||
return path.getrelative(os.getcwd(), _TestFolder)
|
return path.getrelative(os.getcwd(), _TestFolder)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local _RawFolder = path.getabsolute("../../raw")
|
||||||
|
function RawFolder()
|
||||||
|
return path.getrelative(os.getcwd(), _RawFolder)
|
||||||
|
end
|
||||||
|
|
||||||
-- Target Directories
|
-- Target Directories
|
||||||
TargetDirectoryBin = "%{wks.location}/bin/%{cfg.buildcfg}_%{cfg.platform}"
|
TargetDirectoryBin = "%{wks.location}/bin/%{cfg.buildcfg}_%{cfg.platform}"
|
||||||
TargetDirectoryLib = "%{wks.location}/lib/%{cfg.buildcfg}_%{cfg.platform}"
|
TargetDirectoryLib = "%{wks.location}/lib/%{cfg.buildcfg}_%{cfg.platform}"
|
||||||
|
52
tools/scripts/raw.lua
Normal file
52
tools/scripts/raw.lua
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
Raw = {}
|
||||||
|
|
||||||
|
function Raw:include(includes)
|
||||||
|
if includes:handle(self:name()) then
|
||||||
|
Utils:include(includes)
|
||||||
|
includedirs {
|
||||||
|
RawFolder()
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function Raw:link(links)
|
||||||
|
end
|
||||||
|
|
||||||
|
function Raw:use()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function Raw:name()
|
||||||
|
return "Raw"
|
||||||
|
end
|
||||||
|
|
||||||
|
function Raw:project()
|
||||||
|
local folder = RawFolder()
|
||||||
|
|
||||||
|
project(self:name())
|
||||||
|
targetdir(TargetDirectoryBin)
|
||||||
|
location "%{wks.location}/raw"
|
||||||
|
kind "Utility"
|
||||||
|
|
||||||
|
files {
|
||||||
|
path.join(folder, "*/**"),
|
||||||
|
path.join(folder, "*/**")
|
||||||
|
}
|
||||||
|
|
||||||
|
vpaths {
|
||||||
|
["*"] = {
|
||||||
|
folder
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
filter "files:**"
|
||||||
|
buildmessage 'Copying rawfile %{file.relpath}'
|
||||||
|
buildcommands {
|
||||||
|
-- Relpath contains two .. so build/raw is getting reverted in the target path
|
||||||
|
"cp \"%{file.relpath}\" \"%{cfg.targetdir}/build/raw/%{file.relpath}\""
|
||||||
|
}
|
||||||
|
buildoutputs {
|
||||||
|
"%{cfg.targetdir}/build/raw/%{file.relpath}"
|
||||||
|
}
|
||||||
|
filter {}
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user