Skip to content

Commit 4838453

Browse files
authored
Duplicate shape (#89)
* testing nix * fix: found it. * fix: fix toolchain.toml
1 parent b0c734d commit 4838453

File tree

143 files changed

+9462
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+9462
-6
lines changed

.cargo/config.toml

100644100755
File mode changed.

.github/ISSUE_TEMPLATE/bug_report.md

100644100755
File mode changed.

.github/ISSUE_TEMPLATE/feature_request.md

100644100755
File mode changed.

.github/ISSUE_TEMPLATE/refactor-.md

100644100755
File mode changed.

.github/workflows/rust.yml

100644100755
File mode changed.

.gitignore

100644100755
File mode changed.

CONTRIBUTING.md

100644100755
File mode changed.

Cargo.lock

100644100755
File mode changed.

Cargo.toml

100644100755
File mode changed.

LICENSE.md

100644100755
File mode changed.

README.md

100644100755
File mode changed.

all_wgsl.wgsl

100644100755
File mode changed.

assets/Gallery/README.md

100644100755
File mode changed.

assets/Gallery/cosmic/README.md

100644100755
File mode changed.

assets/Gallery/cosmic/screenshot.png

100644100755
File mode changed.

assets/Gallery/cyber-anim-arrowX/cyber-anim-arrowX.png

100644100755
File mode changed.

assets/Gallery/fbmCloud/fmb_cloud.wgsl

100644100755
File mode changed.

assets/Gallery/fbmCloud/screenshot.png

100644100755
File mode changed.

assets/Gallery/flame/README.md

100644100755
File mode changed.

assets/Gallery/flame/screenshot.png

100644100755
File mode changed.

assets/Gallery/kishimisu-palette/README.md

100644100755
File mode changed.

assets/Gallery/kishimisu-palette/screenshot.png

100644100755
File mode changed.

assets/Gallery/light-spirals/README.md

100644100755
File mode changed.

assets/Gallery/light-spirals/screenshot.png

100644100755
File mode changed.

assets/Gallery/lines/README.md

100644100755
File mode changed.

assets/Gallery/lines/dotted_line.wgsl

100644100755
File mode changed.

assets/Gallery/lines/screenshot.png

100644100755
File mode changed.

assets/Gallery/perlin-waves/perlin-waves.wgsl

100644100755
File mode changed.

assets/Gallery/perlin-waves/screenshot.png

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-48-16/README.md

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-48-16/screenshot.png

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-48-43/README.md

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-48-43/screenshot.png

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-48-52/README.md

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-48-52/screenshot.png

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-48-58/README.md

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-48-58/screenshot.png

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-49-02/README.md

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-49-02/screenshot.png

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-49-07/README.md

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-49-07/screenshot.png

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-49-23/README.md

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-49-23/screenshot.png

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-49-33/README.md

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-49-33/screenshot.png

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-49-38/README.md

100644100755
File mode changed.

assets/Gallery/playing-with-builtin-maths-functions/21-49-38/screenshot.png

100644100755
File mode changed.

assets/Gallery/sailing-beyond/README.md

100644100755
File mode changed.

assets/Gallery/sailing-beyond/screenshot.png

100644100755
File mode changed.

assets/Gallery/semi-circle-waves/README.md

100644100755
File mode changed.

assets/Gallery/semi-circle-waves/screenshot.png

100644100755
File mode changed.

assets/Gallery/slug-ring/README.md

100644100755
File mode changed.

assets/Gallery/slug-ring/screenshot.png

100644100755
File mode changed.

assets/Gallery/smoothstep-colouring-a-2dCircle/README.md

100644100755
File mode changed.

assets/Gallery/smoothstep-colouring-a-2dCircle/screenshot.png

100644100755
File mode changed.

assets/Gallery/using-textures/screenshot.png

100644100755
File mode changed.

assets/Gallery/w10/README.md

100644100755
File mode changed.

assets/Gallery/w10/screenshot.png

100644100755
File mode changed.

assets/Gallery/warp/README.md

100644100755
File mode changed.

assets/Gallery/warp/screenshot.png

100644100755
File mode changed.

assets/Gallery/water-caustics/README.md

100644100755
File mode changed.

assets/Gallery/water-caustics/screenshot.png

100644100755
File mode changed.

assets/environment_maps/info.txt

100644100755
File mode changed.

assets/fonts/FiraMono-LICENSE

100644100755
File mode changed.

assets/logo/shadplay_logo.png

100644100755
File mode changed.

assets/shaders/WIP-black-hole.wgsl

100644100755
File mode changed.

assets/shaders/WIP-total_noob.wgsl

100644100755
File mode changed.

assets/shaders/WIP-waterPool.wgsl

100644100755
File mode changed.

assets/shaders/aura.wgsl

100644100755
File mode changed.

assets/shaders/common/notes.wgsl

100644100755
File mode changed.

assets/shaders/electro_cube.wgsl

100644100755
File mode changed.

assets/shaders/fast_dots.wgsl

100644100755
File mode changed.

assets/shaders/four_to_the_floor.wgsl

100644100755
File mode changed.

assets/shaders/grid_with_colours.wgsl

100644100755
File mode changed.

assets/shaders/howto-mouse.wgsl

100644100755
File mode changed.

assets/shaders/howto-texture.wgsl

100644100755
File mode changed.

assets/shaders/indexing_into_vec_with_loop.wgsl

100644100755
File mode changed.

assets/shaders/myshader.wgsl

100644100755
File mode changed.

assets/shaders/myshader_2d.wgsl

100644100755
File mode changed.

assets/shaders/rain_generator.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/BROKEN_fbm_lightning.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/BROKEN_tuesday_tinkering.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/cosmic.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/cyber-anim-arrowX.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/discoteq2.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/flame.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/kishimisu.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/light-spirals.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/octagon_fun.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/polar-coords-experiments.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/sailing-beyond.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/semi-circle-wave.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/shadertoy.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/star.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/universe_within.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/voronoi_simple.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/w10.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/warp.wgsl

100644100755
File mode changed.

assets/shaders/shadertoy-ports/water-caustic-tileable.wgsl

100644100755
File mode changed.

assets/textures/space.jpg

100644100755
File mode changed.

bevy-shader-book.md

+9,253

bevy-shaders-cheatsheet.md

100644100755
File mode changed.

build.rs

100644100755
File mode changed.

examples/README.md

100644100755
File mode changed.

examples/might/Cargo.lock

100644100755
File mode changed.

examples/might/Cargo.toml

100644100755
File mode changed.

examples/might/LICENSE

100644100755
File mode changed.

examples/might/README.md

100644100755
File mode changed.

examples/might/src/main.rs

100644100755
File mode changed.

flake.lock

+96
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
description = "Rust dev shell for Shadplay...";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6+
rust-overlay.url = "github:oxalica/rust-overlay";
7+
};
8+
9+
outputs = { self, nixpkgs, rust-overlay }:
10+
let
11+
overlays = [
12+
(import rust-overlay)
13+
(self: super: {
14+
rustToolchain = super.rust-bin.nightly.latest.default;
15+
})
16+
];
17+
18+
allSystems = [
19+
"x86_64-linux"
20+
"aarch64-linux"
21+
"x86_64-darwin"
22+
"aarch64-darwin"
23+
];
24+
25+
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
26+
pkgs = import nixpkgs { inherit overlays system; };
27+
});
28+
in
29+
{
30+
devShells = forAllSystems ({ pkgs }: {
31+
default = pkgs.mkShell {
32+
packages = (with pkgs; [
33+
alsa-lib
34+
cargo-nextest
35+
clang
36+
fontconfig
37+
fontconfig.dev
38+
freetype.dev
39+
libxkbcommon
40+
lld
41+
openssl
42+
pkg-config
43+
rustToolchain
44+
udev
45+
vulkan-headers
46+
vulkan-loader
47+
vulkan-tools
48+
vulkan-validation-layers
49+
wayland
50+
xorg.libX11
51+
xorg.libXcursor
52+
xorg.libXi
53+
xorg.libXrandr
54+
]) ++ pkgs.lib.optionals pkgs.stdenv.isDarwin (with pkgs; [ libiconv ]);
55+
56+
shellHook = ''
57+
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.lib.makeLibraryPath [
58+
pkgs.alsaLib
59+
pkgs.udev
60+
pkgs.vulkan-loader
61+
pkgs.openssl
62+
pkgs.alsa-lib
63+
pkgs.libxkbcommon
64+
65+
]}"
66+
rustup default nightly
67+
'';
68+
};
69+
});
70+
};
71+
}

hitlist.txt

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
https://www.shadertoy.com/view/X3sSDB
2+
3+
https://www.shadertoy.com/view/lXXXWr
4+
5+
https://www.shadertoy.com/view/lXsSRs
6+
7+
https://www.shadertoy.com/view/4XlXW7
8+
9+
https://www.shadertoy.com/view/43XSRf
10+
11+
https://www.shadertoy.com/view/M32GW3
12+
13+
https://www.shadertoy.com/view/MXSGWV
14+
15+
https://www.shadertoy.com/view/43BGRV
16+
17+
18+
19+
20+
21+
22+
23+
24+
25+
26+

readme_assets/banner-art.png

100644100755
File mode changed.

readme_assets/ferris-adam.png

100644100755
File mode changed.

readme_assets/shadertoy-default-gif-example.gif

100644100755
File mode changed.

readme_assets/smootstep-concept.png

100644100755
File mode changed.

rust-toolchain.toml

-2
This file was deleted.

scripts/README.md

100644100755
File mode changed.

scripts/file-and-func.py

100644100755
File mode changed.

scripts/make-bevy-shaderdoc.py

100644100755
File mode changed.

scripts/reset-2d.py

100644100755
File mode changed.

scripts/reset-3d.py

100644100755
File mode changed.

scripts/screenshots-to-gallery.py

100644100755
File mode changed.

scripts/update-gallery.py

100644100755
File mode changed.

scripts/wgsl-case-changer.py

100644100755
File mode changed.

src/lib.rs

100644100755
File mode changed.

src/main.rs

100644100755
File mode changed.

src/plugin.rs

100644100755
File mode changed.

src/shader_utils/common.rs

100644100755
File mode changed.

src/shader_utils/common.wgsl

100644100755
File mode changed.

src/shader_utils/mod.rs

100644100755
File mode changed.

src/shader_utils/texture_tooling.rs

100644100755
File mode changed.

src/system/clipboard.rs

100644100755
File mode changed.

src/system/config.rs

100644100755
File mode changed.

src/system/drag_n_drop.rs

100644100755
File mode changed.

src/system/gif_maker.rs

100644100755
File mode changed.

src/system/mod.rs

100644100755
File mode changed.

src/system/screenshot.rs

100644100755
File mode changed.

src/ui/colour_picker_plugin.rs

100644100755
File mode changed.

src/ui/help_ui.rs

100644100755
File mode changed.

src/ui/mod.rs

100644100755
File mode changed.

src/utils.rs

100644100755
+12-4
Original file line numberDiff line numberDiff line change
@@ -300,16 +300,24 @@ pub fn setup_3d(mut commands: Commands, shape_options: Res<ShapeOptions>) {
300300
}
301301

302302
/// System: Cleans up the 3d camera. Called on exit of [`AppState::ThreeD`]
303-
pub fn cleanup_3d(mut commands: Commands, mut q: Query<(Entity, &mut Camera)>) {
304-
for (ent, _q) in q.iter_mut() {
303+
pub fn cleanup_3d(
304+
mut commands: Commands,
305+
mut cam_q: Query<(Entity, &mut Camera)>,
306+
mut shape_q: Query<(Entity, &Transform), With<Shape>>,
307+
) {
308+
for (ent, _cam) in cam_q.iter_mut() {
305309
commands.entity(ent).despawn_recursive();
306310
trace!("Despawned 3D camera.")
307311
}
312+
for (ent, _tf) in shape_q.iter_mut() {
313+
commands.entity(ent).despawn_recursive();
314+
trace!("Despawned shape.")
315+
}
308316
}
309317

310318
/// System: Cleans up the 2d camera. Called on exit of [`AppState::TwoD`]
311-
pub fn cleanup_2d(mut commands: Commands, mut q: Query<(Entity, &mut Camera)>) {
312-
for (ent, _q) in q.iter_mut() {
319+
pub fn cleanup_2d(mut commands: Commands, mut cam_q: Query<(Entity, &mut Camera)>) {
320+
for (ent, _q) in cam_q.iter_mut() {
313321
commands.entity(ent).despawn_recursive();
314322
trace!("Despawned 2D camera.")
315323
}

toolchain.toml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# toolchain.toml
2+
[toolchain]
3+
channel = "nightly"
4+
components = ["rustfmt", "rust-src", "rust_analyzer"]

0 commit comments

Comments
 (0)