Skip to content

Commit

Permalink
Fix instancing example for hdr (#6554)
Browse files Browse the repository at this point in the history
# Objective

- Using the instancing example as reference, I found it was breaking when enabling HDR on the camera. I found that this was because, unlike in internal code, this was not updating the specialization key with `view.hdr`.

## Solution

- Add the missing HDR bit.
  • Loading branch information
aevyrie committed Nov 12, 2022
1 parent ffa489a commit c3c4088
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/shader/shader_instancing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,12 @@ fn queue_custom(
let msaa_key = MeshPipelineKey::from_msaa_samples(msaa.samples);

for (view, mut transparent_phase) in &mut views {
let view_key = msaa_key | MeshPipelineKey::from_hdr(view.hdr);
let rangefinder = view.rangefinder3d();
for (entity, mesh_uniform, mesh_handle) in &material_meshes {
if let Some(mesh) = meshes.get(mesh_handle) {
let key =
msaa_key | MeshPipelineKey::from_primitive_topology(mesh.primitive_topology);
view_key | MeshPipelineKey::from_primitive_topology(mesh.primitive_topology);
let pipeline = pipelines
.specialize(&mut pipeline_cache, &custom_pipeline, key, &mesh.layout)
.unwrap();
Expand Down

0 comments on commit c3c4088

Please sign in to comment.