bevy/assets
Mathis Brossier 119eb51f00
Fix game_of_life shader relying on Naga bug (#18951)
# Objective

The game of life example shader relies on a Naga bug
([6397](https://github.com/gfx-rs/wgpu/issues/6397) /
[4536](https://github.com/gfx-rs/wgpu/issues/4536)). In WGSL certain
arithmetic operations must be explicitly parenthesized
([reference](https://www.w3.org/TR/WGSL/#operator-precedence-associativity)).
Naga doesn't enforce that (and also the precedence order is [messed
up](https://github.com/gfx-rs/wgpu/issues/4536#issuecomment-1780113990)).

So this example may break soon. This is the only sample shader having
this issue.

## Solution

added parentheses

## Testing

ran the example before and after the fix with `cargo run --example
compute_shader_game_of_life`
2025-04-26 21:38:08 +00:00
..
android-res/mipmap-mdpi
animation_graphs Implement additive blending for animation graphs. (#15631) 2024-10-04 22:13:22 +00:00
branding
cursors/kenney_crosshairPack Support texture atlases in CustomCursor::Image (#17121) 2025-01-14 22:27:24 +00:00
data
docs
environment_maps Implement percentage-closer soft shadows (PCSS). (#13497) 2024-09-18 18:07:17 +00:00
external Add external assets to .gitignore (#17388) 2025-01-17 01:20:14 +00:00
fonts
irradiance_volumes
lightmaps Introduce support for mixed lighting by allowing lights to opt out of contributing diffuse light to lightmapped objects. (#16761) 2024-12-16 23:48:33 +00:00
models Fix validation errors in Fox.glb (#17801) 2025-02-11 22:19:24 +00:00
pixel
scenes Fix error in scene example (#17799) 2025-02-11 22:20:23 +00:00
shaders Fix game_of_life shader relying on Naga bug (#18951) 2025-04-26 21:38:08 +00:00
sounds Programmed soundtrack example (#12774) 2024-03-29 20:32:30 +00:00
textures Add support for specular tints and maps per the KHR_materials_specular glTF extension. (#14069) 2025-01-26 20:38:46 +00:00
volumes Allow fog density texture to be scrolled over time with an offset (#14868) 2024-08-22 19:43:14 +00:00