-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: make the previously versioned wgsls into individual md docs per shader in the Gallery * chore: add a top level toc style thing for the Gallery
- Loading branch information
1 parent
2c6f0df
commit 3b5965c
Showing
62 changed files
with
349 additions
and
722 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
_shaders | ||
screenshots/* | ||
_deprecated | ||
|
||
# Generated by Cargo | ||
# will have compiled files and executables | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
| Link | Screenshot | | ||
| -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | | ||
| [cosmic](cosmic/README.md) | <img src="cosmic/screenshot.png" width="256" alt="screenshot"> | | ||
| [water-caustics](water-caustics/README.md) | <img src="water-caustics/screenshot.png" width="256" alt="screenshot"> | | ||
| [flame](flame/README.md) | <img src="flame/screenshot.png" width="256" alt="screenshot"> | | ||
| [smoothstep-colouring-a-2dCircle](smoothstep-colouring-a-2dCircle/README.md) | <img src="smoothstep-colouring-a-2dCircle/screenshot.png" width="256" alt="screenshot"> | | ||
| [lines](lines/README.md) | <img src="lines/screenshot.png" width="256" alt="screenshot"> | | ||
| [semi-circle-waves](semi-circle-waves/README.md) | <img src="semi-circle-waves/screenshot.png" width="256" alt="screenshot"> | | ||
| [playing-with-builtin-maths-functions/21-49-23](playing-with-builtin-maths-functions/21-49-23/README.md) | <img src="playing-with-builtin-maths-functions/21-49-23/screenshot.png" width="256" alt="screenshot"> | | ||
| [playing-with-builtin-maths-functions/21-48-43](playing-with-builtin-maths-functions/21-48-43/README.md) | <img src="playing-with-builtin-maths-functions/21-48-43/screenshot.png" width="256" alt="screenshot"> | | ||
| [playing-with-builtin-maths-functions/21-49-02](playing-with-builtin-maths-functions/21-49-02/README.md) | <img src="playing-with-builtin-maths-functions/21-49-02/screenshot.png" width="256" alt="screenshot"> | | ||
| [playing-with-builtin-maths-functions/21-49-07](playing-with-builtin-maths-functions/21-49-07/README.md) | <img src="playing-with-builtin-maths-functions/21-49-07/screenshot.png" width="256" alt="screenshot"> | | ||
| [playing-with-builtin-maths-functions/21-48-58](playing-with-builtin-maths-functions/21-48-58/README.md) | <img src="playing-with-builtin-maths-functions/21-48-58/screenshot.png" width="256" alt="screenshot"> | | ||
| [playing-with-builtin-maths-functions/21-48-16](playing-with-builtin-maths-functions/21-48-16/README.md) | <img src="playing-with-builtin-maths-functions/21-48-16/screenshot.png" width="256" alt="screenshot"> | | ||
| [playing-with-builtin-maths-functions/21-49-38](playing-with-builtin-maths-functions/21-49-38/README.md) | <img src="playing-with-builtin-maths-functions/21-49-38/screenshot.png" width="256" alt="screenshot"> | | ||
| [playing-with-builtin-maths-functions/21-48-52](playing-with-builtin-maths-functions/21-48-52/README.md) | <img src="playing-with-builtin-maths-functions/21-48-52/screenshot.png" width="256" alt="screenshot"> | | ||
| [playing-with-builtin-maths-functions/21-49-33](playing-with-builtin-maths-functions/21-49-33/README.md) | <img src="playing-with-builtin-maths-functions/21-49-33/screenshot.png" width="256" alt="screenshot"> | | ||
| [kishimisu-palette](kishimisu-palette/README.md) | <img src="kishimisu-palette/screenshot.png" width="256" alt="screenshot"> | | ||
| [sailing-beyond](sailing-beyond/README.md) | <img src="sailing-beyond/screenshot.png" width="256" alt="screenshot"> | | ||
| [warp](warp/README.md) | <img src="warp/screenshot.png" width="256" alt="screenshot"> | | ||
| [w10](w10/README.md) | <img src="w10/screenshot.png" width="256" alt="screenshot"> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
## kishimisu-palette | ||
|
||
 | ||
|
||
### fragment | ||
|
||
```rust | ||
#import bevy_pbr::mesh_view_bindings globals | ||
#import bevy_pbr::mesh_vertex_output MeshVertexOutput | ||
|
||
|
||
@fragment | ||
fn fragment(in: MeshVertexOutput) -> @location(0) vec4<f32> { | ||
return kishimisu(in); | ||
} | ||
|
||
// This is a port/cover of Kimishisu's awesome YT tutotial: https://www.youtube.com/watch?v=f4s1h2YETNY | ||
fn kishimisu(in: MeshVertexOutput) -> vec4<f32> { | ||
let uv0 = ((in.uv.xy) * 2.0) - 1.0; | ||
var uv = (in.uv.xy) ; | ||
|
||
var output = vec3(0.0); | ||
|
||
for (var i = 0.0; i < 1.0; i += 1.0) { | ||
uv = fract((uv * .0982)) - 1.225; | ||
|
||
var d = length(uv) * exp(-length(uv0)); | ||
|
||
var col = palette(length(uv0) + (i * 4.3) + (globals.time * .4)); | ||
|
||
d = sin(d * 8. + globals.time) / 4.; | ||
d = abs(d); | ||
|
||
d = pow(0.01 / d, 1.8); | ||
|
||
output += col * d; | ||
} | ||
|
||
return vec4<f32>(output, 1.0); | ||
} | ||
|
||
fn palette(t: f32) -> vec3<f32> { | ||
let a = vec3<f32>(0.5, 0.5, 0.5); | ||
let b = vec3<f32>(0.5, 0.5, 0.5); | ||
let c = vec3<f32>(1.0, 1.0, 1.0); | ||
let d = vec3<f32>(0.263, 0.416, 0.557); | ||
|
||
return a + b * cos(6.28318 * (c * t + d)); | ||
} | ||
``` | ||
|
||
your comments go here... |
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
Oops, something went wrong.