Load shader from disk if they are only available as referenced assets to write techniques using them

This commit is contained in:
Jan
2022-04-15 12:54:10 +02:00
parent 7d80ff670d
commit 0f3d1d3488
5 changed files with 115 additions and 29 deletions

View File

@ -1,5 +1,7 @@
#pragma once
#include <string>
#include "Game/IW4/IW4.h"
#include "AssetLoading/BasicAssetLoader.h"
#include "SearchPath/ISearchPath.h"
@ -9,6 +11,8 @@ namespace IW4
class AssetLoaderPixelShader final : public BasicAssetLoader<ASSET_TYPE_PIXELSHADER, MaterialPixelShader>
{
public:
_NODISCARD static std::string GetFileNameForAsset(const std::string& assetName);
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
_NODISCARD bool CanLoadFromRaw() const override;
bool LoadFromRaw(const std::string& assetName, ISearchPath* searchPath, MemoryManager* memory, IAssetLoadingManager* manager, Zone* zone) const override;