Function TRAP::Graphics::ShaderManager::LoadFile(const std::filesystem::path&, RendererAPI::ShaderType, const std::vector<Shader::Macro>&)#

Function Documentation#

Ref<Shader> TRAP::Graphics::ShaderManager::LoadFile(const std::filesystem::path &filepath, RendererAPI::ShaderType shaderType, const std::vector<Shader::Macro> &userMacros = {})#

Load a shader from file. File name will be used as the shader name.

Parameters:
  • filepath – File path of shader to load.

  • shaderType – Type of the shader.

  • userMacrosOptional user defined macros. Default: nullptr.

Returns:

Loaded shader.