16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 02:09:19 +02:00

refractive material support contd.

This commit is contained in:
Wls50
2025-11-24 18:29:55 +01:00
committed by Hirek
parent ff50fdf110
commit 76d5d3831d
9 changed files with 35 additions and 14 deletions

View File

@@ -274,6 +274,11 @@ bool MaShaderCompiler::CompileMaterial(YAML::Node &dest, const YAML::Node &src,
local_definitions.insert(local_definitions.end(), definitions.begin(),
definitions.end());
if (pass == MaterialRenderPass::Forward &&
TemplateOverride("refraction", src, templates).as<bool>(false)) {
local_definitions.emplace_back(L"REFRACTION", L"1");
}
auto blob = CompileShaderToBlob(file_name, ToWide(entry_name),
local_definitions, target, platform);