Skip to content

Commit

Permalink
devlog newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
schell committed Aug 24, 2024
1 parent 3a70bd5 commit c2ada42
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions DEVLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1405,30 +1405,47 @@ I added WASM support! Most of the work was ensuring that the shaders validate (s
## Fri Sep 1, 2023

While adding WASM support I found that my shaders were not validating in the browser.
Apparently this is because of an extra traspilation step from spv -> wgsl - because when targeting WebGPU in the browser, shaders must be written in WGSL, and naga's WGSL backend doesn't like infinities or NaNs.
Apparently this is because of an extra traspilation step from spv -> wgsl -
because when targeting WebGPU in the browser, shaders must be written in WGSL,
and naga's WGSL backend doesn't like infinities or NaNs.

Here's [the related ticket](https://github.com/gfx-rs/naga/issues/2461).
I ended up having to track down all the infinity and NaN comparisons and replace the functions that have those comparisons in their call trees. I then created a clippy lint to disallow those functions.
I ended up having to track down all the infinity and NaN comparisons and
replace the functions that have those comparisons in their call trees. I then
created a clippy lint to disallow those functions.

## Fri Aug 4, 2023

I tried to bump `rust-gpu` to 0.9 but ran into [an issue](https://github.com/EmbarkStudios/rust-gpu/issues/1089) where shaders that previously compiled no longer compile.
I tried to bump `rust-gpu` to 0.9 but ran into [an
issue](https://github.com/EmbarkStudios/rust-gpu/issues/1089) where shaders
that previously compiled no longer compile.
`spirv-opt` was erring because it didn't like _something_.
I'm working with @eddyb to figure out what the problem is.
Here's a link to the start of the [conversation](https://discord.com/channels/750717012564770887/750717499737243679/1136766077330796595).
Here's a link to the start of the
[conversation](https://discord.com/channels/750717012564770887/750717499737243679/1136766077330796595).

I also fixed an issue where two versions of `glam` were being built - `0.22` by `spirv-std` and `0.24` by `renderling-shader`, which was causing CI to fail.
I also fixed an issue where two versions of `glam` were being built - `0.22` by
`spirv-std` and `0.24` by `renderling-shader`, which was causing CI to fail.

## Thur Aug 3, 2023

I greatly reduced the artifacts in the prefiltered environment cube used for specular highlights.
I did this by using a simplified `calc_lod` and also by generating enough mipmaps.
Previously I was only making 5 mip levels but the `calc_lod` was often requiring 21+!
Of course the environment cubemap's face size is only 512, which leads to 9 mip levels total - so now I'm providing 9 mips.
Of course the environment cubemap's face size is only 512, which leads to 9 mip
levels total - so now I'm providing 9 mips.

I also noticed that the IBL diffuse irradiance samples were not aligned! Now the normal's Y is flipped in the irradiance convolution.
I also noticed that the IBL diffuse irradiance samples were not aligned! Now
the normal's Y is flipped in the irradiance convolution.

## Wed Aug 2, 2023

When generating mipmaps I ran into a problem where sampling the original texture was always coming up [0.0, 0.0 0.0, 0.0]. It turns out that the sampler was trying to read from the mipmap at level 1, and of course it didn't exist yet as that was the one I was trying to generate. The fix was to sample a different texture - one without slots for the mipmaps, then throw away that texture.
When generating mipmaps I ran into a problem where sampling the original
texture was always coming up [0.0, 0.0 0.0, 0.0].
It turns out that the sampler was trying to read from the mipmap at level 1,
and of course it didn't exist yet as that was the one I was trying to generate.
The fix was to sample a different texture - one without slots for the mipmaps,
then throw away that texture.

I have to generate mipmaps to smooth out the irradiance and prefiltered cubemaps that we use for pbr shading.
I have to generate mipmaps to smooth out the irradiance and prefiltered
cubemaps that we use for pbr shading.

0 comments on commit c2ada42

Please sign in to comment.