mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-09-05 16:27:27 +00:00
refactor: streamline techset dumper
This commit is contained in:
16
src/ObjCommon/Shader/ShaderCommon.cpp
Normal file
16
src/ObjCommon/Shader/ShaderCommon.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include "ShaderCommon.h"
|
||||
|
||||
#include <format>
|
||||
|
||||
namespace shader
|
||||
{
|
||||
std::string GetFileNameForPixelShaderAssetName(const std::string& assetName)
|
||||
{
|
||||
return std::format("shader_bin/ps_{}.cso", assetName);
|
||||
}
|
||||
|
||||
std::string GetFileNameForVertexShaderAssetName(const std::string& assetName)
|
||||
{
|
||||
return std::format("shader_bin/vs_{}.cso", assetName);
|
||||
}
|
||||
} // namespace phys_constraints
|
9
src/ObjCommon/Shader/ShaderCommon.h
Normal file
9
src/ObjCommon/Shader/ShaderCommon.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace shader
|
||||
{
|
||||
std::string GetFileNameForPixelShaderAssetName(const std::string& assetName);
|
||||
std::string GetFileNameForVertexShaderAssetName(const std::string& assetName);
|
||||
} // namespace shader
|
16
src/ObjCommon/Techset/TechsetCommon.cpp
Normal file
16
src/ObjCommon/Techset/TechsetCommon.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include "TechsetCommon.h"
|
||||
|
||||
#include <format>
|
||||
|
||||
namespace techset
|
||||
{
|
||||
std::string GetFileNameForTechniqueName(const std::string& assetName)
|
||||
{
|
||||
return std::format("techniques/{}.tech", assetName);
|
||||
}
|
||||
|
||||
std::string GetFileNameForTechsetName(const std::string& assetName)
|
||||
{
|
||||
return std::format("techsets/{}.techset", assetName);
|
||||
}
|
||||
} // namespace phys_constraints
|
9
src/ObjCommon/Techset/TechsetCommon.h
Normal file
9
src/ObjCommon/Techset/TechsetCommon.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace techset
|
||||
{
|
||||
std::string GetFileNameForTechniqueName(const std::string& assetName);
|
||||
std::string GetFileNameForTechsetName(const std::string& assetName);
|
||||
}
|
Reference in New Issue
Block a user