-
Notifications
You must be signed in to change notification settings - Fork 9
Permit setting ambient light #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This way also the inside of the triangles are lighted. It could however lead to too bright lights, so that weights of the lights may need to be adjusted.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #48 +/- ##
========================================
- Coverage 4.98% 4.97% -0.02%
========================================
Files 6 6
Lines 883 885 +2
Branches 127 127
========================================
Hits 44 44
- Misses 836 838 +2
Partials 3 3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds ambient light control to the OpenGL shader system to improve visibility of surfaces viewed from above. The change allows users to adjust ambient lighting strength from the default value of 0.0 to enhance brightness of surfaces that would otherwise appear too dark due to the directional lighting setup.
- Added an
ambientparameter to control ambient light strength in the shader - Refactored lighting calculations to use weight arrays for cleaner code organization
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Top lights are brighter than and bottom lights, leading to different brightness for triangles facing down. This helps create some shadows and depth, for example on folded brain images.
However, this is less desired for shapes like the empty corpus callosum, where one can see the lower surface from above. Also the top surface is not bright enough as it is missing light from the headlight. This can usually be improved substantially by increasing the ambient light (it is 0 by default), e.g. to a value of 0.3 or 0.4. We now add a parameter to adjust this value in the shader.