Handle shader options of any type

This commit is contained in:
Jérôme Leclercq
2021-09-03 19:33:41 +02:00
parent 2f9e495739
commit 02a12d9328
38 changed files with 236 additions and 1118 deletions

View File

@@ -12,7 +12,7 @@ NAZARA_REQUEST_DEDICATED_GPU()
const char shaderSource[] = R"(
option red: bool;
option red: bool = false;
[layout(std140)]
struct Data
@@ -109,7 +109,6 @@ int main()
}
Nz::ShaderWriter::States states;
states.enabledOptions = 0;
states.optimize = true;
auto fragVertShader = device->InstantiateShaderModule(Nz::ShaderStageType::Fragment | Nz::ShaderStageType::Vertex, Nz::ShaderLanguage::NazaraShader, shaderSource, sizeof(shaderSource), states);