mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
add 'do-trace-shaders' setting and fix shaders recompiling
This commit is contained in:
parent
5e3373313b
commit
a621b179d3
10 changed files with 84 additions and 26 deletions
|
|
@ -71,8 +71,8 @@ static auto process_program(const ResPaths& paths, const std::string& filename)
|
|||
|
||||
auto& preprocessor = *Shader::preprocessor;
|
||||
|
||||
auto vertex = preprocessor.process(vertexFile, vertexSource);
|
||||
auto fragment = preprocessor.process(fragmentFile, fragmentSource);
|
||||
auto vertex = preprocessor.process(vertexFile, vertexSource, false, {});
|
||||
auto fragment = preprocessor.process(fragmentFile, fragmentSource, false, {});
|
||||
return std::make_pair(vertex, fragment);
|
||||
}
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ assetload::postfunc assetload::posteffect(
|
|||
|
||||
auto& preprocessor = *Shader::preprocessor;
|
||||
preprocessor.addHeader(
|
||||
"__effect__", preprocessor.process(effectFile, effectSource, true)
|
||||
"__effect__", preprocessor.process(effectFile, effectSource, true, {})
|
||||
);
|
||||
|
||||
auto [vertex, fragment] = process_program(paths, SHADERS_FOLDER + "/effect");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue