Skip to content

Commit

Permalink
include toplevel shader-associated defs (#9343)
Browse files Browse the repository at this point in the history
# Objective

shader defs associated with a shader via `load_internal_asset!` or
`Shader::from_xxx_with_defs` were being accidentally ignored for
top-level shaders.

## Solution

include the defs for top level shaders.
  • Loading branch information
robtfm authored Aug 3, 2023
1 parent 731a6fb commit db47ea2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/bevy_render/src/render_resource/pipeline_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ impl ShaderCache {

let shader_defs = shader_defs
.into_iter()
.chain(shader.shader_defs.iter().cloned())
.map(|def| match def {
ShaderDefVal::Bool(k, v) => {
(k, naga_oil::compose::ShaderDefValue::Bool(v))
Expand Down

0 comments on commit db47ea2

Please sign in to comment.