Commit 19d23e5
Fix the CPU sky-shader demo.
It's supposed to produce a landscape with a small white sun, blue sky,
and yellow ground. Instead it produces a small white sun and everything
else is black. The problem is with the
`sun_intensity_extra_spec_const_factor` argument to `sky_shader::fs`.
- When running on the GPU, `sky_shader::fs` is called from `main_fs`,
which has a spec_constant with a default value of 100.
- When running on the CPU, `sky_shader::fs` is called directly from the
CPU shader's `main`, and it passes 1.
In other words, the CPU shader's sun intensity is 100x too small, which
explains why it's so dark. This commit changes the value to 100, which
makes the CPU shader produce the expected result.
(The shader later divides the intensity value by 100. There are comments
about integration testing for specialization constants that I don't
understand.)1 parent ca2ea7b commit 19d23e5
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
0 commit comments