Skip to content

Commit

Permalink
Explain usage of prepass shaders in docs for Material trait (bevyen…
Browse files Browse the repository at this point in the history
…gine#9025)

# Objective

- Fixes bevyengine#8696.

## Solution

- Added a paragraph describing the usage of the `prepass_vertex_shader`
and `prepass_fragment_shader`.
  • Loading branch information
geieredgar authored and ameknite committed Nov 6, 2023
1 parent f0b59dc commit bc9fcab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/bevy_pbr/src/material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,18 @@ pub trait Material: Asset + AsBindGroup + Clone + Sized {

/// Returns this material's prepass vertex shader. If [`ShaderRef::Default`] is returned, the default prepass vertex shader
/// will be used.
///
/// This is used for the various [prepasses](bevy_core_pipeline::prepass) as well as for generating the depth maps
/// required for shadow mapping.
fn prepass_vertex_shader() -> ShaderRef {
ShaderRef::Default
}

/// Returns this material's prepass fragment shader. If [`ShaderRef::Default`] is returned, the default prepass fragment shader
/// will be used.
///
/// This is used for the various [prepasses](bevy_core_pipeline::prepass) as well as for generating the depth maps
/// required for shadow mapping.
#[allow(unused_variables)]
fn prepass_fragment_shader() -> ShaderRef {
ShaderRef::Default
Expand Down

0 comments on commit bc9fcab

Please sign in to comment.