bevy/examples/ecs
Johannes Hackel 1fcf6a444f
Add emissive_exposure_weight to the StandardMaterial (#13350)
# Objective

- The emissive color gets multiplied by the camera exposure value. But
this cancels out almost any emissive effect.
- Fixes #13133
- Closes PR #13337 

## Solution
- Add emissive_exposure_weight to the StandardMaterial
- In the shader this value is stored in the alpha channel of the
emissive color.
- This value defines how much the exposure influences the emissive
color.
- It's equal to Google's Filament:
https://google.github.io/filament/Materials.html#emissive

4f021583f1/shaders/src/shading_lit.fs (L287)

## Testing

- The result of
[EmissiveStrengthTest](https://github.com/KhronosGroup/glTF-Sample-Models/tree/main/2.0/EmissiveStrengthTest)
with the default value of 0.0:

without bloom:

![emissive_fix](https://github.com/bevyengine/bevy/assets/688816/8f8c131a-464a-4d7b-a9e4-4e28d679ee5d)

with bloom:

![emissive_fix_bloom](https://github.com/bevyengine/bevy/assets/688816/89f200ee-3bd5-4daa-bf64-8999b56df3fa)
2024-05-17 13:49:53 +00:00
..
component_change_detection.rs Remove redundant imports (#12817) 2024-04-01 19:59:08 +00:00
component_hooks.rs Remove ComponentStorage and associated types (#12311) 2024-03-05 15:54:52 +00:00
custom_query_param.rs Fix some doc warnings (#12961) 2024-04-14 15:23:44 +00:00
custom_schedule.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
dynamic.rs Remove redundant imports (#12817) 2024-04-01 19:59:08 +00:00
ecs_guide.rs Make AppExit more specific about exit reason. (#13022) 2024-04-22 16:48:18 +00:00
event.rs Refactor EventReader::iter to read (#9631) 2023-08-30 14:20:03 +00:00
fixed_timestep.rs Unify FixedTime and Time while fixing several problems (#8964) 2023-10-16 01:57:55 +00:00
generic_system.rs Add insert_state to App. (#11043) 2023-12-21 14:09:24 +00:00
hierarchy.rs Fix green colors becoming darker in various examples (#12328) 2024-03-05 23:42:03 +00:00
iter_combinations.rs Add emissive_exposure_weight to the StandardMaterial (#13350) 2024-05-17 13:49:53 +00:00
nondeterministic_system_order.rs Fix non-functional nondeterministic_system_order example (#10719) 2023-11-25 21:13:35 +00:00
one_shot_systems.rs Make one-shot example more noob friendly (#13201) 2024-05-03 13:00:56 +00:00
parallel_query.rs Parallel event reader (#12554) 2024-04-22 16:37:42 +00:00
removal_detection.rs Migrate from LegacyColor to bevy_color::Color (#12163) 2024-02-29 19:35:12 +00:00
run_conditions.rs Simplify conditions (#11316) 2024-01-13 13:22:17 +00:00
send_and_receive_events.rs fix some typos (#12038) 2024-02-22 18:55:22 +00:00
startup_system.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
system_closure.rs Allow tuples and single plugins in add_plugins, deprecate add_plugin (#8097) 2023-06-21 20:51:03 +00:00
system_param.rs Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
system_piping.rs Add support for updating the tracing subscriber in LogPlugin (#10822) 2024-01-15 15:26:13 +00:00
system_stepping.rs Remove stepping from default features (#12847) 2024-04-03 19:16:02 +00:00