Skip to content
Merged
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
125 changes: 67 additions & 58 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2804,28 +2804,6 @@ A shader in its most common usage is a small program that is run by the GPU per-
There are also compute shaders which are used for more general processing leveraging the GPU's parallelism.
"""

[[example]]
name = "custom_vertex_attribute"
path = "examples/shader/custom_vertex_attribute.rs"
doc-scrape-examples = true

[package.metadata.example.custom_vertex_attribute]
name = "Custom Vertex Attribute"
description = "A shader that reads a mesh's custom vertex attribute"
category = "Shaders"
wasm = true

[[example]]
name = "custom_post_processing"
path = "examples/shader/custom_post_processing.rs"
doc-scrape-examples = true

[package.metadata.example.custom_post_processing]
name = "Post Processing - Custom Render Pass"
description = "A custom post processing effect, using a custom render pass that runs after the main pass"
category = "Shaders"
wasm = true

[[example]]
name = "shader_defs"
path = "examples/shader/shader_defs.rs"
Expand Down Expand Up @@ -2916,29 +2894,6 @@ description = "A shader that uses WESL"
category = "Shaders"
wasm = true

[[example]]
name = "custom_shader_instancing"
path = "examples/shader/custom_shader_instancing.rs"
doc-scrape-examples = true

[package.metadata.example.custom_shader_instancing]
name = "Instancing"
description = "A shader that renders a mesh multiple times in one draw call using low level rendering api"
category = "Shaders"
wasm = true

[[example]]
name = "custom_render_phase"
path = "examples/shader/custom_render_phase.rs"
doc-scrape-examples = true

[package.metadata.example.custom_render_phase]
name = "Custom Render Phase"
description = "Shows how to make a complete render phase"
category = "Shaders"
wasm = true


[[example]]
name = "automatic_instancing"
path = "examples/shader/automatic_instancing.rs"
Expand Down Expand Up @@ -2994,17 +2949,6 @@ description = "A shader that shows how to reuse the core bevy PBR shading functi
category = "Shaders"
wasm = true

[[example]]
name = "texture_binding_array"
path = "examples/shader/texture_binding_array.rs"
doc-scrape-examples = true

[package.metadata.example.texture_binding_array]
name = "Texture Binding Array (Bindless Textures)"
description = "A shader that shows how to bind and sample multiple textures as a binding array (a.k.a. bindless textures)."
category = "Shaders"
wasm = false

[[example]]
name = "storage_buffer"
path = "examples/shader/storage_buffer.rs"
Expand All @@ -3016,9 +2960,74 @@ description = "A shader that shows how to bind a storage buffer using a custom m
category = "Shaders"
wasm = true

# Shaders advanced
[[package.metadata.example_category]]
name = "Shaders - advanced"
description = """
These examples demonstrate how to use the lower level rendering apis exposed from bevy.

These are generally simplified examples of bevy's own rendering infrastructure.
"""

[[example]]
name = "custom_vertex_attribute"
path = "examples/shader_advanced/custom_vertex_attribute.rs"
doc-scrape-examples = true

[package.metadata.example.custom_vertex_attribute]
name = "Custom Vertex Attribute"
description = "A shader that reads a mesh's custom vertex attribute"
category = "Shaders"
wasm = true

[[example]]
name = "custom_post_processing"
path = "examples/shader_advanced/custom_post_processing.rs"
doc-scrape-examples = true

[package.metadata.example.custom_post_processing]
name = "Post Processing - Custom Render Pass"
description = "A custom post processing effect, using a custom render pass that runs after the main pass"
category = "Shaders"
wasm = true

[[example]]
name = "custom_shader_instancing"
path = "examples/shader_advanced/custom_shader_instancing.rs"
doc-scrape-examples = true

[package.metadata.example.custom_shader_instancing]
name = "Instancing"
description = "A shader that renders a mesh multiple times in one draw call using low level rendering api"
category = "Shaders"
wasm = true

[[example]]
name = "custom_render_phase"
path = "examples/shader_advanced/custom_render_phase.rs"
doc-scrape-examples = true

[package.metadata.example.custom_render_phase]
name = "Custom Render Phase"
description = "Shows how to make a complete render phase"
category = "Shaders"
wasm = true

[[example]]
name = "texture_binding_array"
path = "examples/shader_advanced/texture_binding_array.rs"
doc-scrape-examples = true

[package.metadata.example.texture_binding_array]
name = "Texture Binding Array (Bindless Textures)"
description = "A shader that shows how to bind and sample multiple textures as a binding array (a.k.a. bindless textures)."
category = "Shaders"
wasm = false


[[example]]
name = "specialized_mesh_pipeline"
path = "examples/shader/specialized_mesh_pipeline.rs"
path = "examples/shader_advanced/specialized_mesh_pipeline.rs"
doc-scrape-examples = true

[package.metadata.example.specialized_mesh_pipeline]
Expand Down Expand Up @@ -4187,7 +4196,7 @@ wasm = false

[[example]]
name = "custom_phase_item"
path = "examples/shader/custom_phase_item.rs"
path = "examples/shader_advanced/custom_phase_item.rs"
doc-scrape-examples = true

[package.metadata.example.custom_phase_item]
Expand Down
14 changes: 7 additions & 7 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,26 +458,26 @@ Example | Description
[Animated](../examples/shader/animate_shader.rs) | A shader that uses dynamic data like the time since startup
[Array Texture](../examples/shader/array_texture.rs) | A shader that shows how to reuse the core bevy PBR shading functionality in a custom material that obtains the base color from an array texture.
[Compute - Game of Life](../examples/shader/compute_shader_game_of_life.rs) | A compute shader that simulates Conway's Game of Life
[Custom Render Phase](../examples/shader/custom_render_phase.rs) | Shows how to make a complete render phase
[Custom Vertex Attribute](../examples/shader/custom_vertex_attribute.rs) | A shader that reads a mesh's custom vertex attribute
[Custom phase item](../examples/shader/custom_phase_item.rs) | Demonstrates how to enqueue custom draw commands in a render phase
[Custom Render Phase](../examples/shader_advanced/custom_render_phase.rs) | Shows how to make a complete render phase
[Custom Vertex Attribute](../examples/shader_advanced/custom_vertex_attribute.rs) | A shader that reads a mesh's custom vertex attribute
[Custom phase item](../examples/shader_advanced/custom_phase_item.rs) | Demonstrates how to enqueue custom draw commands in a render phase
[Extended Bindless Material](../examples/shader/extended_material_bindless.rs) | Demonstrates bindless `ExtendedMaterial`
[Extended Material](../examples/shader/extended_material.rs) | A custom shader that builds on the standard material
[GPU readback](../examples/shader/gpu_readback.rs) | A very simple compute shader that writes to a buffer that is read by the cpu
[Instancing](../examples/shader/custom_shader_instancing.rs) | A shader that renders a mesh multiple times in one draw call using low level rendering api
[Instancing](../examples/shader/automatic_instancing.rs) | Shows that multiple instances of a cube are automatically instanced in one draw call
[Instancing](../examples/shader_advanced/custom_shader_instancing.rs) | A shader that renders a mesh multiple times in one draw call using low level rendering api
[Material](../examples/shader/shader_material.rs) | A shader and a material that uses it
[Material](../examples/shader/shader_material_2d.rs) | A shader and a material that uses it on a 2d mesh
[Material - Bindless](../examples/shader/shader_material_bindless.rs) | Demonstrates how to make materials that use bindless textures
[Material - GLSL](../examples/shader/shader_material_glsl.rs) | A shader that uses the GLSL shading language
[Material - Screenspace Texture](../examples/shader/shader_material_screenspace_texture.rs) | A shader that samples a texture with view-independent UV coordinates
[Material - WESL](../examples/shader/shader_material_wesl.rs) | A shader that uses WESL
[Material Prepass](../examples/shader/shader_prepass.rs) | A shader that uses the various textures generated by the prepass
[Post Processing - Custom Render Pass](../examples/shader/custom_post_processing.rs) | A custom post processing effect, using a custom render pass that runs after the main pass
[Post Processing - Custom Render Pass](../examples/shader_advanced/custom_post_processing.rs) | A custom post processing effect, using a custom render pass that runs after the main pass
[Shader Defs](../examples/shader/shader_defs.rs) | A shader that uses "shaders defs" (a bevy tool to selectively toggle parts of a shader)
[Specialized Mesh Pipeline](../examples/shader/specialized_mesh_pipeline.rs) | Demonstrates how to write a specialized mesh pipeline
[Specialized Mesh Pipeline](../examples/shader_advanced/specialized_mesh_pipeline.rs) | Demonstrates how to write a specialized mesh pipeline
[Storage Buffer](../examples/shader/storage_buffer.rs) | A shader that shows how to bind a storage buffer using a custom material.
[Texture Binding Array (Bindless Textures)](../examples/shader/texture_binding_array.rs) | A shader that shows how to bind and sample multiple textures as a binding array (a.k.a. bindless textures).
[Texture Binding Array (Bindless Textures)](../examples/shader_advanced/texture_binding_array.rs) | A shader that shows how to bind and sample multiple textures as a binding array (a.k.a. bindless textures).

### State

Expand Down
Loading