-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ACES2065-1 and ACEScg as shading system color spaces (#1486)
To make functions like blackbody, wavelength and luminance work with these color spaces. Signed-off-by: Brecht Van Lommel <[email protected]>
- Loading branch information
Showing
8 changed files
with
62 additions
and
18 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
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Compiled test.osl -> test.oso | ||
RGB to XYZ (0.1 0.7 0.2) = (0.191286 0.509818 0.204353) | ||
blackbody (1500) = 75.0559 22.3461 2.22219 | ||
wavelength (500) = 0 0.207563 0.105645 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env python | ||
|
||
# Copyright Contributors to the Open Shading Language project. | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage | ||
|
||
command = testshade("-colorspace ACEScg test") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright Contributors to the Open Shading Language project. | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
// https://github.com/AcademySoftwareFoundation/OpenShadingLanguage | ||
|
||
#include "../common/shaders/pretty.h" | ||
|
||
shader | ||
test () | ||
{ | ||
color c = color (.1, .7, .2); | ||
printf (" RGB to XYZ (%g) = (%g)\n", pretty(c), pretty(transformc("RGB", "XYZ", c))); | ||
|
||
float temperature = 1500; | ||
printf (" blackbody (%g) = %g\n", pretty(temperature), pretty(blackbody(temperature))); | ||
|
||
float cyan = 500; | ||
printf (" wavelength (%g) = %g\n", pretty(cyan), pretty(wavelength_color(cyan))); | ||
} |