-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve how translucent materials handle color (#1513)
* fix translucent coloring * Add Redox's code for emitter lighting (fix #608) * Create a method (translucentRayColor) for code that was previously duplicated * Bring more of the duplicated code into translucentRayColor * Remove Redox's fix for #608, additional testing needed * Cap each color's transmissivity at 1 Example: RGBA = 0.8, 0.35, 0.05, 0.2 Uncapped transmissivity RGB = 1.6, 0.7, 0.1 Capped transmissivity RGB = 1, 0.775, 0.625 * Extract transmissivity cap from formula into a constant (for future configurability) Also, select the highest transmissivity value properly this time * improve translucent coloring * Create a method (translucentRayColor) for code that was previously duplicated * Bring more of the duplicated code into translucentRayColor * Cap each color's transmissivity at 1 Example: RGBA = 0.8, 0.35, 0.05, 0.2 Uncapped transmissivity RGB = 1.6, 0.7, 0.1 Capped transmissivity RGB = 1, 0.775, 0.625 * Extract transmissivity cap from formula into a constant (for future configurability) Also, select the highest transmissivity value properly this time * block half-ish of the light on the diffuse pass and another half-ish on the translucent pass (actually 1 - sqrt(1-x)) * Add a slider for `Transmissivity cap` value - Added a slider for the `Transmissivity cap` value with range [1, 3]. - Added a `group-label` CSS class for group labels. * Move `Transmissivity cap` to the `Advanced` tab * Ensure that total energy is never amplified, even when transmissivityCap > 1. * you just got vectored * Revert changes to MaterialsTab.java `Transmissivity cap` had been moved to the `Advanced` tab, but other changes to the `Materials` tab were not reverted then. --------- Co-authored-by: Peregrine05 <[email protected]>
- Loading branch information
1 parent
18ba283
commit fdecd82
Showing
8 changed files
with
134 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters