bevy/crates
Martin Lysell 7db64a7b3b
Fix anisotropy not working when material is lit by environment map light (#20077)
Fixes objects being lit by environment map light not having the
anisotropy effect applied correctly. The contribution of light from the
environment map with anisotropy is calculated but immediately discarded.
Instead what is applied is the regular environment map contribution
(calculated without anisotropy) that happen right after.

This patch fixes the logic here to what I think is the intended one.
Only calculate contribution once, with or without anisotropy depending
on shader specialization.

## Solution

- Properly apply normal modification if anisotropy is enabled.
- Remove duplicate environment map light calculation

## Testing
Tested this by running the anisotropy example and comparing main vs PR
results. See images below.

---

## Showcase

Main:
<img width="580" height="503" alt="Main-AnisoEnabled"
src="https://github.com/user-attachments/assets/47471a12-60cd-48ba-a32e-60086b6d162a"
/>

PR:
<img width="592" height="509" alt="WithFix-AnisoEnabled"
src="https://github.com/user-attachments/assets/e1f6b82c-1bac-40e1-8925-3abece05f406"
/>


</details>
2025-07-14 21:03:02 +00:00
..
bevy_a11y Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_animation remove unused dependencies (#19998) 2025-07-07 20:10:33 +00:00
bevy_anti_aliasing Clean up several miscellaneous uses of weak_handle. (#19408) 2025-07-08 06:45:40 +00:00
bevy_app Rename send_event and similar methods to write_event (#20017) 2025-07-07 22:05:16 +00:00
bevy_asset Fix a NestedLoader code path that failed to use its meta transform (#19117) 2025-07-14 20:15:47 +00:00
bevy_audio remove unused dependencies (#19998) 2025-07-07 20:10:33 +00:00
bevy_camera consistently dont use smallvec default features (#19972) 2025-07-06 04:25:26 +00:00
bevy_color Ugrade to wgpu version 25.0 (#19563) 2025-06-26 19:41:47 +00:00
bevy_core_pipeline Clean up several miscellaneous uses of weak_handle. (#19408) 2025-07-08 06:45:40 +00:00
bevy_core_widgets Fix core widgets unconditionally enabling bevy_ui_picking_backend (#20055) 2025-07-14 20:55:42 +00:00
bevy_derive Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_dev_tools Add frame_time graph to fps_overlay v2 (#19277) 2025-07-09 16:59:21 +00:00
bevy_diagnostic Add max_history_length to EntityCountDiagnosticsPlugin (#20085) 2025-07-12 23:00:38 +00:00
bevy_dylib Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_ecs Prevent TOCTOU bugs in ComponentsQueuedRegistrator (#20016) 2025-07-14 20:41:18 +00:00
bevy_encase_derive Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_feathers Changing the notification protocol for core_widgets. (#20086) 2025-07-13 17:25:11 +00:00
bevy_gilrs remove unused dependencies (#19998) 2025-07-07 20:10:33 +00:00
bevy_gizmos remove unused dependencies (#19998) 2025-07-07 20:10:33 +00:00
bevy_gltf Fix glTF light orientation (#20122) 2025-07-14 13:20:18 +00:00
bevy_image Add zstd release note (#20053) 2025-07-14 20:53:26 +00:00
bevy_input Rename send_event and similar methods to write_event (#20017) 2025-07-07 22:05:16 +00:00
bevy_input_focus Rename send_event and similar methods to write_event (#20017) 2025-07-07 22:05:16 +00:00
bevy_internal make optional crates for mesh, camera, and light (#19997) 2025-07-07 07:35:32 +00:00
bevy_light Move IrradianceVolume to bevy_light (#20000) 2025-07-07 20:11:43 +00:00
bevy_log Upgrade to Rust 1.88 (#19825) 2025-06-26 19:38:19 +00:00
bevy_macro_utils Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_math bevy_math: don't allow dead code (#20039) 2025-07-08 17:46:01 +00:00
bevy_mesh remove unused dependencies (#19998) 2025-07-07 20:10:33 +00:00
bevy_mikktspace Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_pbr Fix anisotropy not working when material is lit by environment map light (#20077) 2025-07-14 21:03:02 +00:00
bevy_picking Bump typos to 1.34.0 (#20013) 2025-07-07 20:15:06 +00:00
bevy_platform bevy_platform: clippy without default features (#19860) 2025-06-29 17:12:57 +00:00
bevy_ptr Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_reflect bevy_reflect: Use active_types instead of active_fields where appropriate (#19922) 2025-07-14 20:24:46 +00:00
bevy_remote formatting fix in bevy_remote cargo.toml (#20033) 2025-07-08 17:02:02 +00:00
bevy_render GpuReadbackPlugin: Allow reading only a part of a buffer (#20133) 2025-07-14 21:01:16 +00:00
bevy_scene Upgrade to Rust 1.88 (#19825) 2025-06-26 19:38:19 +00:00
bevy_solari Fix visibility (re)use in Solari DI (#20113) 2025-07-13 19:33:09 +00:00
bevy_sprite Material, mesh, skin extraction optimization (#17976) 2025-07-09 06:23:44 +00:00
bevy_state Rename send_event and similar methods to write_event (#20017) 2025-07-07 22:05:16 +00:00
bevy_tasks Update derive_more requirement from 1 to 2 (#19671) 2025-06-24 11:13:04 +00:00
bevy_text consistently dont use smallvec default features (#19972) 2025-07-06 04:25:26 +00:00
bevy_time Rename send_event and similar methods to write_event (#20017) 2025-07-07 22:05:16 +00:00
bevy_transform Update derive_more requirement from 1 to 2 (#19671) 2025-06-24 11:13:04 +00:00
bevy_ui FIX - RelativeCursorPosition Changed<> query filter (#20102) 2025-07-13 19:44:40 +00:00
bevy_ui_render UI gradients long hue paths fix (#20010) 2025-07-07 22:19:24 +00:00
bevy_utils Make Parallel<T> more T: !Default accessible (#17943) 2025-07-07 20:22:20 +00:00
bevy_window remove unused dependencies (#19998) 2025-07-07 20:10:33 +00:00
bevy_winit Rename send_event and similar methods to write_event (#20017) 2025-07-07 22:05:16 +00:00