Skip to content
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

use nightly on the actions #90

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
Empty file modified .cargo/config.toml
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/bug_report.md
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/feature_request.md
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/refactor-.md
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@nightly
with:
targets: x86_64-unknown-linux-gnu
- name: install dependencies
Expand Down
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified CONTRIBUTING.md
100644 → 100755
Empty file.
Empty file modified Cargo.lock
100644 → 100755
Empty file.
Empty file modified Cargo.toml
100644 → 100755
Empty file.
Empty file modified LICENSE.md
100644 → 100755
Empty file.
7 changes: 7 additions & 0 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ then:

______________________________________________________________________

## Stability:

The shaders in `assets/shaders/shadertoy-ports` _should_ usually work with the latest bevy.
With _other_ shaders, for example those prefaced with `BROKEN_...` your mileage will vary, I cannot update all the shaders every single time `wgsl/bevy/naga/wgpu` change stuff :(, if _you_ can than see below:

______________________________________________________________________

## Contributing:

See the [guide](./CONTRIBUTING.md)
Expand Down
Empty file modified all_wgsl.wgsl
100644 → 100755
Empty file.
Empty file modified assets/Gallery/README.md
100644 → 100755
Empty file.
Empty file modified assets/Gallery/cosmic/README.md
100644 → 100755
Empty file.
Empty file modified assets/Gallery/cosmic/screenshot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/Gallery/cyber-anim-arrowX/cyber-anim-arrowX.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/Gallery/fbmCloud/fmb_cloud.wgsl
100644 → 100755
Empty file.
Empty file modified assets/Gallery/fbmCloud/screenshot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/Gallery/flame/README.md
100644 → 100755
Empty file.
Empty file modified assets/Gallery/flame/screenshot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/Gallery/kishimisu-palette/README.md
100644 → 100755
Empty file.
Empty file modified assets/Gallery/kishimisu-palette/screenshot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/Gallery/light-spirals/README.md
100644 → 100755
Empty file.
Empty file modified assets/Gallery/light-spirals/screenshot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/Gallery/lines/README.md
100644 → 100755
Empty file.
Empty file modified assets/Gallery/lines/dotted_line.wgsl
100644 → 100755
Empty file.
Empty file modified assets/Gallery/lines/screenshot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/Gallery/perlin-waves/perlin-waves.wgsl
100644 → 100755
Empty file.
Empty file modified assets/Gallery/perlin-waves/screenshot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/Gallery/sailing-beyond/README.md
100644 → 100755
Empty file.
Empty file modified assets/Gallery/sailing-beyond/screenshot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/Gallery/semi-circle-waves/README.md
100644 → 100755
Empty file.
Empty file modified assets/Gallery/semi-circle-waves/screenshot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/Gallery/slug-ring/README.md
100644 → 100755
Empty file.
Empty file modified assets/Gallery/slug-ring/screenshot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/Gallery/smoothstep-colouring-a-2dCircle/README.md
100644 → 100755
Empty file.
Empty file modified assets/Gallery/smoothstep-colouring-a-2dCircle/screenshot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/Gallery/using-textures/screenshot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/Gallery/w10/README.md
100644 → 100755
Empty file.
Empty file modified assets/Gallery/w10/screenshot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/Gallery/warp/README.md
100644 → 100755
Empty file.
Empty file modified assets/Gallery/warp/screenshot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/Gallery/water-caustics/README.md
100644 → 100755
Empty file.
Empty file modified assets/Gallery/water-caustics/screenshot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/environment_maps/info.txt
100644 → 100755
Empty file.
Empty file modified assets/fonts/FiraMono-LICENSE
100644 → 100755
Empty file.
Empty file modified assets/logo/shadplay_logo.png
100644 → 100755
Empty file modified assets/shaders/WIP-black-hole.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/WIP-total_noob.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/WIP-waterPool.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/aura.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/common/notes.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/electro_cube.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/fast_dots.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/four_to_the_floor.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/grid_with_colours.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/howto-mouse.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/howto-texture.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/indexing_into_vec_with_loop.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/myshader.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/myshader_2d.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/rain_generator.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/BROKEN_fbm_lightning.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/BROKEN_tuesday_tinkering.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/cosmic.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/cyber-anim-arrowX.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/discoteq2.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/flame.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/kishimisu.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/light-spirals.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/octagon_fun.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/polar-coords-experiments.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/sailing-beyond.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/semi-circle-wave.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/shadertoy.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/star.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/universe_within.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/voronoi_simple.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/w10.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/warp.wgsl
100644 → 100755
Empty file.
Empty file modified assets/shaders/shadertoy-ports/water-caustic-tileable.wgsl
100644 → 100755
Empty file.
Empty file modified assets/textures/space.jpg
100644 → 100755
9,253 changes: 9,253 additions & 0 deletions bevy-shader-book.md

Large diffs are not rendered by default.

Empty file modified bevy-shaders-cheatsheet.md
100644 → 100755
Empty file.
Empty file modified build.rs
100644 → 100755
Empty file.
Empty file modified examples/README.md
100644 → 100755
Empty file.
Empty file modified examples/might/Cargo.lock
100644 → 100755
Empty file.
Empty file modified examples/might/Cargo.toml
100644 → 100755
Empty file.
Empty file modified examples/might/LICENSE
100644 → 100755
Empty file.
Empty file modified examples/might/README.md
100644 → 100755
Empty file.
Empty file modified examples/might/src/main.rs
100644 → 100755
Empty file.
96 changes: 96 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 71 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
description = "Rust dev shell for Shadplay...";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
};

outputs = { self, nixpkgs, rust-overlay }:
let
overlays = [
(import rust-overlay)
(self: super: {
rustToolchain = super.rust-bin.nightly.latest.default;
})
];

allSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];

forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
pkgs = import nixpkgs { inherit overlays system; };
});
in
{
devShells = forAllSystems ({ pkgs }: {
default = pkgs.mkShell {
packages = (with pkgs; [
alsa-lib
cargo-nextest
clang
fontconfig
fontconfig.dev
freetype.dev
libxkbcommon
lld
openssl
pkg-config
rustToolchain
udev
vulkan-headers
vulkan-loader
vulkan-tools
vulkan-validation-layers
wayland
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
]) ++ pkgs.lib.optionals pkgs.stdenv.isDarwin (with pkgs; [ libiconv ]);

shellHook = ''
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.lib.makeLibraryPath [
pkgs.alsaLib
pkgs.udev
pkgs.vulkan-loader
pkgs.openssl
pkgs.alsa-lib
pkgs.libxkbcommon

]}"
rustup default nightly
'';
};
});
};
}
26 changes: 26 additions & 0 deletions hitlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
https://www.shadertoy.com/view/X3sSDB

https://www.shadertoy.com/view/lXXXWr

https://www.shadertoy.com/view/lXsSRs

https://www.shadertoy.com/view/4XlXW7

https://www.shadertoy.com/view/43XSRf

https://www.shadertoy.com/view/M32GW3

https://www.shadertoy.com/view/MXSGWV

https://www.shadertoy.com/view/43BGRV











Empty file modified readme_assets/banner-art.png
100644 → 100755
Empty file modified readme_assets/ferris-adam.png
100644 → 100755
Empty file modified readme_assets/shadertoy-default-gif-example.gif
100644 → 100755
Empty file modified readme_assets/smootstep-concept.png
100644 → 100755
2 changes: 0 additions & 2 deletions rust-toolchain.toml

This file was deleted.

Empty file modified scripts/README.md
100644 → 100755
Empty file.
Empty file modified scripts/file-and-func.py
100644 → 100755
Empty file.
Empty file modified scripts/make-bevy-shaderdoc.py
100644 → 100755
Empty file.
Empty file modified scripts/reset-2d.py
100644 → 100755
Empty file.
Empty file modified scripts/reset-3d.py
100644 → 100755
Empty file.
Empty file modified scripts/screenshots-to-gallery.py
100644 → 100755
Empty file.
Empty file modified scripts/update-gallery.py
100644 → 100755
Empty file.
Empty file modified scripts/wgsl-case-changer.py
100644 → 100755
Empty file.
Empty file modified src/lib.rs
100644 → 100755
Empty file.
Empty file modified src/main.rs
100644 → 100755
Empty file.
Empty file modified src/plugin.rs
100644 → 100755
Empty file.
Empty file modified src/shader_utils/common.rs
100644 → 100755
Empty file.
Empty file modified src/shader_utils/common.wgsl
100644 → 100755
Empty file.
Empty file modified src/shader_utils/mod.rs
100644 → 100755
Empty file.
Empty file modified src/shader_utils/texture_tooling.rs
100644 → 100755
Empty file.
Empty file modified src/system/clipboard.rs
100644 → 100755
Empty file.
Empty file modified src/system/config.rs
100644 → 100755
Empty file.
Empty file modified src/system/drag_n_drop.rs
100644 → 100755
Empty file.
Empty file modified src/system/gif_maker.rs
100644 → 100755
Empty file.
Empty file modified src/system/mod.rs
100644 → 100755
Empty file.
Empty file modified src/system/screenshot.rs
100644 → 100755
Empty file.
Empty file modified src/ui/colour_picker_plugin.rs
100644 → 100755
Empty file.
Empty file modified src/ui/help_ui.rs
100644 → 100755
Empty file.
Empty file modified src/ui/mod.rs
100644 → 100755
Empty file.
16 changes: 12 additions & 4 deletions src/utils.rs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -300,16 +300,24 @@ pub fn setup_3d(mut commands: Commands, shape_options: Res<ShapeOptions>) {
}

/// System: Cleans up the 3d camera. Called on exit of [`AppState::ThreeD`]
pub fn cleanup_3d(mut commands: Commands, mut q: Query<(Entity, &mut Camera)>) {
for (ent, _q) in q.iter_mut() {
pub fn cleanup_3d(
mut commands: Commands,
mut cam_q: Query<(Entity, &mut Camera)>,
mut shape_q: Query<(Entity, &Transform), With<Shape>>,
) {
for (ent, _cam) in cam_q.iter_mut() {
commands.entity(ent).despawn_recursive();
trace!("Despawned 3D camera.")
}
for (ent, _tf) in shape_q.iter_mut() {
commands.entity(ent).despawn_recursive();
trace!("Despawned shape.")
}
}

/// System: Cleans up the 2d camera. Called on exit of [`AppState::TwoD`]
pub fn cleanup_2d(mut commands: Commands, mut q: Query<(Entity, &mut Camera)>) {
for (ent, _q) in q.iter_mut() {
pub fn cleanup_2d(mut commands: Commands, mut cam_q: Query<(Entity, &mut Camera)>) {
for (ent, _q) in cam_q.iter_mut() {
commands.entity(ent).despawn_recursive();
trace!("Despawned 2D camera.")
}
Expand Down
4 changes: 4 additions & 0 deletions toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# toolchain.toml
[toolchain]
channel = "nightly"
components = ["rustfmt", "rust-src", "rust_analyzer"]