mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-03-25 05:53:03 +00:00
feat: compile iw5 techsets
This commit is contained in:
@@ -34,6 +34,22 @@ namespace IW5
|
||||
"lit omni dfog",
|
||||
"lit omni shadow",
|
||||
"lit omni shadow dfog",
|
||||
"lit instanced",
|
||||
"lit instanced dfog",
|
||||
"lit instanced sun",
|
||||
"lit instanced sun dfog",
|
||||
"lit instanced sun shadow",
|
||||
"lit instanced sun shadow dfog",
|
||||
"lit instanced spot",
|
||||
"lit instanced spot dfog",
|
||||
"lit instanced spot shadow",
|
||||
"lit instanced spot shadow dfog",
|
||||
"lit instanced spot shadow cucoloris",
|
||||
"lit instanced spot shadow cucoloris dfog",
|
||||
"lit instanced omni",
|
||||
"lit instanced omni dfog",
|
||||
"lit instanced omni shadow",
|
||||
"lit instanced omni shadow dfog",
|
||||
"light spot",
|
||||
"light omni",
|
||||
"light spot shadow",
|
||||
@@ -46,6 +62,7 @@ namespace IW5
|
||||
"shaded wireframe",
|
||||
"thermal",
|
||||
"debug bumpmap",
|
||||
"debug bumpmap instanced",
|
||||
};
|
||||
static_assert(std::extent_v<decltype(techniqueTypeNames)> == TECHNIQUE_COUNT);
|
||||
static inline techset::CommonTechniqueTypeNames commonTechniqueTypeNames(techniqueTypeNames, std::extent_v<decltype(techniqueTypeNames)>);
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#include "ObjCompilerIW5.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "Game/IW5/Techset/TechniqueCompilerIW5.h"
|
||||
#include "Game/IW5/Techset/TechsetCompilerIW5.h"
|
||||
#include "Game/IW5/Techset/VertexDeclCompilerIW5.h"
|
||||
#include "Image/ImageIwdPostProcessor.h"
|
||||
|
||||
#include <memory>
|
||||
@@ -13,7 +16,10 @@ namespace
|
||||
{
|
||||
auto& memory = zone.Memory();
|
||||
|
||||
// No compilers yet
|
||||
collection.AddAssetCreator(techset::CreateVertexDeclCompilerIW5(memory));
|
||||
collection.AddAssetCreator(techset::CreateTechsetCompilerIW5(memory, searchPath));
|
||||
|
||||
collection.AddSubAssetCreator(techset::CreateTechniqueCompilerIW5(memory, zone, searchPath));
|
||||
}
|
||||
|
||||
void ConfigurePostProcessors(AssetCreatorCollection& collection,
|
||||
@@ -39,5 +45,6 @@ void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection,
|
||||
IOutputPath& outDir,
|
||||
IOutputPath& cacheDir) const
|
||||
{
|
||||
ConfigureCompilers(collection, zone, searchPath);
|
||||
ConfigurePostProcessors(collection, zone, zoneDefinition, searchPath, zoneStates, outDir);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME(IW3, IW4, T5, T6)
|
||||
#options GAME(IW3, IW4, IW5, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Techset/TechniqueCompiler" + GAME + ".cpp"
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace
|
||||
pass.customSamplerFlags = static_cast<decltype(MaterialPass::customSamplerFlags)>(commonPass.m_sampler_flags);
|
||||
}
|
||||
|
||||
#ifdef FEATURE_IW4
|
||||
#if defined(FEATURE_IW4) || defined(FEATURE_IW5)
|
||||
// Not sure if this is actually how this is calculated.
|
||||
// It produces identical results at least though.
|
||||
constexpr MaterialConstantSource ALLOWED_PIXEL_CONSTANTS_FOR_FLAG_200[]{
|
||||
@@ -282,7 +282,7 @@ namespace
|
||||
#if defined(FEATURE_IW3)
|
||||
if (lowerTechniqueName == "zprepass")
|
||||
technique.flags |= MTL_TECHFLAG_ZPREPASS;
|
||||
#elif defined(FEATURE_IW4)
|
||||
#elif defined(FEATURE_IW4) || defined(FEATURE_IW5)
|
||||
// Not a particularly cool way to do this but...
|
||||
// the game actually does this :shrug:
|
||||
if (lowerTechniqueName == "zprepass")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME(IW3, IW4, T5, T6)
|
||||
#options GAME(IW3, IW4, IW5, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Techset/TechniqueCompiler" + GAME + ".h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME(IW3, IW4, T5, T6)
|
||||
#options GAME(IW3, IW4, IW5, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Techset/TechsetCompiler" + GAME + ".cpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME(IW3, IW4, T5, T6)
|
||||
#options GAME(IW3, IW4, IW5, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Techset/TechsetCompiler" + GAME + ".h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME(IW3, IW4, T5, T6)
|
||||
#options GAME(IW3, IW4, IW5, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Techset/VertexDeclCompiler" + GAME + ".cpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME(IW3, IW4, T5, T6)
|
||||
#options GAME(IW3, IW4, IW5, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Techset/VertexDeclCompiler" + GAME + ".h"
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "Game/IW5/Image/ImageLoaderEmbeddedIW5.h"
|
||||
#include "Game/IW5/Image/ImageLoaderExternalIW5.h"
|
||||
#include "Game/IW5/Techset/PixelShaderLoaderIW5.h"
|
||||
#include "Game/IW5/Techset/VertexShaderLoaderIW5.h"
|
||||
#include "Game/IW5/XModel/LoaderXModelIW5.h"
|
||||
#include "Leaderboard/LoaderLeaderboardIW5.h"
|
||||
#include "Localize/LoaderLocalizeIW5.h"
|
||||
@@ -129,9 +131,8 @@ namespace
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderXModelSurfs>(memory));
|
||||
collection.AddAssetCreator(xmodel::CreateLoaderIW5(memory, searchPath, zone));
|
||||
collection.AddAssetCreator(material::CreateLoaderIW5(memory, searchPath));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderPixelShader>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderVertexShader>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderVertexDecl>(memory));
|
||||
collection.AddAssetCreator(techset::CreateVertexShaderLoaderIW5(memory, searchPath));
|
||||
collection.AddAssetCreator(techset::CreatePixelShaderLoaderIW5(memory, searchPath));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderTechniqueSet>(memory));
|
||||
collection.AddAssetCreator(image::CreateLoaderEmbeddedIW5(memory, searchPath));
|
||||
collection.AddAssetCreator(image::CreateLoaderExternalIW5(memory, searchPath));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME(IW3, IW4, T5, T6)
|
||||
#options GAME(IW3, IW4, IW5, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Techset/PixelShaderLoader" + GAME + ".cpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME(IW3, IW4, T5, T6)
|
||||
#options GAME(IW3, IW4, IW5, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Techset/PixelShaderLoader" + GAME + ".h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME(IW3, IW4, T5, T6)
|
||||
#options GAME(IW3, IW4, IW5, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Techset/VertexShaderLoader" + GAME + ".cpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME(IW3, IW4, T5, T6)
|
||||
#options GAME(IW3, IW4, IW5, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Techset/VertexShaderLoader" + GAME + ".h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user