bevy/examples/3d
Marco Buono f87de36843 Send emissive color to uniform as linear instead of sRGB (#7897)
This produces more accurate results for the `EmissiveStrengthTest` glTF test case.

(Requires manually setting the emission, for now)

Before: <img width="1392" alt="Screenshot 2023-03-04 at 18 21 25" src="https://user-images.githubusercontent.com/418473/222929455-c7363d52-7133-4d4e-9d6a-562098f6bbe8.png">

After: <img width="1392" alt="Screenshot 2023-03-04 at 18 20 57" src="https://user-images.githubusercontent.com/418473/222929454-3ea20ecb-0773-4aad-978c-3832353b6871.png">

Tagging @JMS55 as a co-author, since this fix is based on their experiments with emission.

# Objective

- Have more accurate results for the `EmissiveStrengthTest` glTF test case.

## Solution

- Make sure we send the emissive color as linear instead of sRGB.

---

## Changelog

- Emission strength is now correctly interpreted by the `StandardMaterial` as linear instead of sRGB.

## Migration Guide

- If you have previously manually specified emissive values with `Color::rgb()` and would like to retain the old visual results, you must now use `Color::rgb_linear()` instead;
- If you have previously manually specified emissive values with `Color::rgb_linear()` and would like to retain the old visual results, you'll need to apply a one-time gamma calculation to your channels manually to get the _actual_ linear RGB value: 
  - For channel values greater than `0.0031308`, use `(1.055 * value.powf(1.0 / 2.4)) - 0.055`;
  - For channel values lower than or equal to `0.0031308`, use `value * 12.92`;
- Otherwise, the results should now be more consistent with other tools/engines.
2023-03-04 23:26:04 +00:00
..
3d_scene.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
3d_shapes.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
atmospheric_fog.rs Better cascades config defaults + builder, tweak example configs (#7456) 2023-02-05 08:06:32 +00:00
blend_modes.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
bloom_3d.rs Send emissive color to uniform as linear instead of sRGB (#7897) 2023-03-04 23:26:04 +00:00
fog.rs Add Distance and Atmospheric Fog support (#6412) 2023-01-29 15:28:56 +00:00
fxaa.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
lighting.rs Send emissive color to uniform as linear instead of sRGB (#7897) 2023-03-04 23:26:04 +00:00
lines.rs Allow passing glam vector types as vertex attributes (#6442) 2022-11-04 03:45:17 +00:00
load_gltf.rs Make ktx2 and zstd default features (#7696) 2023-02-17 01:00:07 +00:00
msaa.rs Include 2x/8x sample counts for Msaa (#7684) 2023-02-17 06:04:01 +00:00
orthographic.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
parenting.rs Base Sets (#7466) 2023-02-06 03:10:08 +00:00
pbr.rs EnvironmentMapLight, BRDF Improvements (#7051) 2023-02-09 16:46:32 +00:00
render_to_texture.rs Base Sets (#7466) 2023-02-06 03:10:08 +00:00
shadow_biases.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
shadow_caster_receiver.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
skybox.rs Make AsBindGroup unsized (#6937) 2022-12-16 01:40:15 +00:00
spherical_area_lights.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
split_screen.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
spotlight.rs Send emissive color to uniform as linear instead of sRGB (#7897) 2023-03-04 23:26:04 +00:00
texture.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
tonemapping.rs Initial tonemapping options (#7594) 2023-02-19 20:38:13 +00:00
transparency_3d.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
two_passes.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
update_gltf_scene.rs Base Sets (#7466) 2023-02-06 03:10:08 +00:00
vertex_colors.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
wireframe.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00