Auto exposure breaks when object is too dark #13446
Labels
A-Rendering
Drawing game state to the screen
C-Bug
An unexpected or incorrect behavior
S-Ready-For-Implementation
This issue is ready for an implementation PR. Go for it!
Milestone
Bevy version
Tested on main commit 2aed777
Relevant system information
Windows 10
What you did
I have an object with just a base texture and a roughness map, exported from Blender to a gltf and then loaded in Bevy.
I'm using the AutoExposurePlugin with pretty much default settings.
What went wrong
If I place the camera near a dark corner of the mesh, facing the dark corner, the image becomes darker instead of brighter.
You can see what I mean in this video: https://discord.com/channels/691052431525675048/743663924229963868/1242088583108624444
Additional information
Removing the roughness map in Blender and setting the roughness to a fixed value 'fixes' the issue.
You can try it out in this fairly minimal reproduction: https://github.com/GitGhillie/bevy_repro/tree/auto-exposure
The camera will spawn roughly here:
![image](https://private-user-images.githubusercontent.com/23659539/332197816-2724d359-dc6a-4635-a509-ef85bcee1e65.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5MTc0NzUsIm5iZiI6MTczOTkxNzE3NSwicGF0aCI6Ii8yMzY1OTUzOS8zMzIxOTc4MTYtMjcyNGQzNTktZGM2YS00NjM1LWE1MDktZWY4NWJjZWUxZTY1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE4VDIyMTkzNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQzMDcyMTdlMzEzYjJlNmRkYWIwYTUxNjVlYzRjY2FiZjMyODgxZDY3ZmMzNTA3M2IwZDc3OWJjMjM0NDk2NmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.9XSCYoJoMX5llqMCPvs-pfN_6pfSa7u7sN-bqPrRRwA)
Move the camera into the dark corner where the arrow is and you should be able to reproduce the effect.
The text was updated successfully, but these errors were encountered: