Skip to content

Commit

Permalink
Mesh shading example (vulkano-rs#2437)
Browse files Browse the repository at this point in the history
* mesh-shader-triangle example: copied from instancing example

* mesh-shader-triangle example: move shaders to separate files

* mesh-shader example: rename example

* mesh-shader example: implement mesh shader generating geometry

* mesh-shader example: fix instance data indexing partially, still has struct alignment issues

* mesh-shader example: fixed instance buffer alignment issues

* remove unnecessary things

Co-authored-by: marc0246 <[email protected]>

* mesh-shader example: cargo fmt

* mesh-shader example: rename shaders to end in .glsl

* mesh-shader example: added color out variable, docs

* mesh-shader example: rename shader again

* mesh-shader example: reformat shader code

* mesh-shader example: cargo fmt with nightly

---------

Co-authored-by: Firestar99 <[email protected]>
Co-authored-by: marc0246 <[email protected]>
  • Loading branch information
3 people authored and hakolao committed Feb 20, 2024
1 parent 8108ccb commit 6455167
Show file tree
Hide file tree
Showing 4 changed files with 626 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/mesh-shader/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "mesh-shader"
version = "0.0.0"
edition = "2021"
publish = false

[[bin]]
name = "mesh-shader"
path = "main.rs"
test = false
bench = false
doc = false

[dependencies]
vulkano = { workspace = true, features = ["macros"] }
vulkano-shaders = { workspace = true }
winit = { workspace = true }
9 changes: 9 additions & 0 deletions examples/mesh-shader/frag.glsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#version 450

layout(location = 0) in vec4 in_color;

layout(location = 0) out vec4 f_color;

void main() {
f_color = in_color;
}
Loading

0 comments on commit 6455167

Please sign in to comment.