Skip to content

N36: bevy_shadertoy_wgsl #1120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 8, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions content/news/036/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Some of the new features include:
- A better data model for meshes, based on groups and channels.
- Game engine integration with Godot, more engines coming soon.
- Introduce Lua as an extension language.
- Add *many* new nodes: Extrude along curve, Copy to points...
- Add _many_ new nodes: Extrude along curve, Copy to points...
- Add experimental support for L-Systems.
- Reworked Look & Feel

Expand All @@ -125,6 +125,29 @@ post on the Discussion boards!
[Blackjack]: https://github.com/setzer22/blackjack
[blackjack-talk-yt]: https://onrendering.com/data/papers/catmark/HalfedgeCatmullClark.pdf

### [bevy_shadertoy_wgsl] and [GLSL2WGSL]

![Shaders courtesy of @leondenise.](shadertoy_wgsl_leon.gif)

[bevy_shadertoy_wgsl] is a [Shadertoy] clone for the Bevy game engine,
where the GLSL shader language is replaced by WGSL. It already comes
with a dozen examples and plenty more to go. Feel free to add your own
shaders to the list!

Plus, [GLSL2WGSL] is a new translator tool that should help migrate the
vast majority of GLSL code to WGSL.

The above GIF showcases the new additions to the examples for
[bevy_shadertoy_wgsl]: two shaders originally written in [Shadertoy] by
[@leondenise], and translated to WGSL with the help of [GLSL2WGSL].
The first part is a reproduction of Joe Gardner from the movie Soul,
and the second part is a lightweight fluid shader.

[bevy_shadertoy_wgsl]: https://github.com/eliotbo/bevy_shadertoy_wgsl
[Shadertoy]: https://www.shadertoy.com
[GLSL2WGSL]: https://eliotbo.github.io/glsl2wgsl/
[@leondenise]: https://twitter.com/leondenise

## Library Updates

### [hecs]
Expand All @@ -133,7 +156,7 @@ post on the Discussion boards!

[Version 0.8][hecs-changelog] marks a breaking change to most methods that
previously took a generic type parameter `T: Component`, replacing them with
methods taking type parameters which must be *references to* component types
methods taking type parameters which must be _references to_ component types
instead. This resolves a long-standing footgun where users accustomed to writing
`&T` in queries might write `world.get::<&T>`, interpreted by rustc as
referencing the valid component type `&'static T`, resulting in code that
Expand Down
Binary file added content/news/036/shadertoy_wgsl_leon.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.