forked from buildaworldnet/IrrlichtBAW
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BRDF explorer app: Done some work on shader generation
- Loading branch information
Showing
2 changed files
with
233 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
examples_tests/13.BRDF_Explorer/CBRDFBuiltinIncludeLoader.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef C_BRDF_BUILTIN_INCLUDE_LOADER_H_INCLUDED | ||
#define C_BRDF_BUILTIN_INCLUDE_LOADER_H_INCLUDED | ||
|
||
#include "irr/asset/IBuiltinIncludeLoader.h" | ||
|
||
class CBRDFBuiltinIncludeLoader : public irr::asset::IBuiltinIncludeLoader | ||
{ | ||
public: | ||
const char* getVirtualDirectoryName() const override { return "glsl/brdf/"; } | ||
|
||
protected: | ||
irr::core::vector<std::pair<std::regex, HandleFunc_t>> getBuiltinNamesToFunctionMapping() const override | ||
{ | ||
/* TODO */ | ||
return { | ||
{ std::regex{"diffuse/lambert\\.glsl"}, [this](const std::string&) { return nullptr; }}, | ||
{ std::regex{"diffuse/oren_nayar\\.glsl"}, [](const std::string&) { return nullptr; }}, | ||
{ std::regex{"specular/ndf/ggx_trowbridge_reitz\\.glsl"}, nullptr }, | ||
{ std::regex{"specular/geom/ggx_smith\\.glsl"}, nullptr }, | ||
{ std::regex{"specular/fresnel/fresnel_schlick\\.glsl"}, nullptr } | ||
}; | ||
} | ||
}; | ||
|
||
#endif //C_BRDF_BUILTIN_INCLUDE_LOADER_H_INCLUDED |