Shader: Replace const for with [unroll] attribute

This commit is contained in:
Jérôme Leclercq
2022-01-03 20:21:09 +01:00
parent b6e4a9470e
commit 2bdcc045cd
13 changed files with 204 additions and 87 deletions

View File

@@ -110,7 +110,7 @@ fn main()
}
}
WHEN("using const for-each")
WHEN("using [unroll] attribute on for-each")
{
std::string_view sourceCode = R"(
const LightCount = 3;
@@ -136,7 +136,9 @@ external
fn main()
{
let color = (0.0).xxxx;
const for light in data.lights
[unroll]
for light in data.lights
{
color += light.color;
}