forked from bartvdbraak/blender
Cleanup: Typo fix for Blackbody variable, had different naming in the comments and also in OSL.
This commit is contained in:
parent
ee5936cf6b
commit
744aaa955f
@ -38,7 +38,7 @@ CCL_NAMESPACE_BEGIN
|
|||||||
#define BSSRDF_MIN_RADIUS 1e-8f
|
#define BSSRDF_MIN_RADIUS 1e-8f
|
||||||
#define BSSRDF_MAX_HITS 4
|
#define BSSRDF_MAX_HITS 4
|
||||||
|
|
||||||
#define BB_DRAPPER 800.0f
|
#define BB_DRAPER 800.0f
|
||||||
#define BB_MAX_TABLE_RANGE 12000.0f
|
#define BB_MAX_TABLE_RANGE 12000.0f
|
||||||
#define BB_TABLE_XPOWER 1.5f
|
#define BB_TABLE_XPOWER 1.5f
|
||||||
#define BB_TABLE_YPOWER 5.0f
|
#define BB_TABLE_YPOWER 5.0f
|
||||||
|
@ -42,7 +42,7 @@ ccl_device void svm_node_blackbody(KernelGlobals *kg, ShaderData *sd, float *sta
|
|||||||
/* Input */
|
/* Input */
|
||||||
float temperature = stack_load_float(stack, temperature_offset);
|
float temperature = stack_load_float(stack, temperature_offset);
|
||||||
|
|
||||||
if (temperature < BB_DRAPPER) {
|
if (temperature < BB_DRAPER) {
|
||||||
/* just return very very dim red */
|
/* just return very very dim red */
|
||||||
color_rgb = make_float3(1.0e-6f,0.0f,0.0f);
|
color_rgb = make_float3(1.0e-6f,0.0f,0.0f);
|
||||||
}
|
}
|
||||||
@ -53,7 +53,7 @@ ccl_device void svm_node_blackbody(KernelGlobals *kg, ShaderData *sd, float *sta
|
|||||||
|
|
||||||
/* reconstruct a proper index for the table lookup, compared to OSL we don't look up two colors
|
/* reconstruct a proper index for the table lookup, compared to OSL we don't look up two colors
|
||||||
just one (the OSL-lerp is also automatically done for us by "lookup_table_read") */
|
just one (the OSL-lerp is also automatically done for us by "lookup_table_read") */
|
||||||
float t = powf((temperature - BB_DRAPPER) * (1.0f / BB_TABLE_SPACING), (1.0f / BB_TABLE_XPOWER));
|
float t = powf((temperature - BB_DRAPER) * (1.0f / BB_TABLE_SPACING), (1.0f / BB_TABLE_XPOWER));
|
||||||
|
|
||||||
int blackbody_table_offset = kernel_data.tables.blackbody_offset;
|
int blackbody_table_offset = kernel_data.tables.blackbody_offset;
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ vector<float> blackbody_table()
|
|||||||
|
|
||||||
/* ToDo: bring this back to what OSL does with the lastTemperature limit ? */
|
/* ToDo: bring this back to what OSL does with the lastTemperature limit ? */
|
||||||
for (int i = 0; i <= 317; ++i) {
|
for (int i = 0; i <= 317; ++i) {
|
||||||
double Temperature = pow((double)i, (double)BB_TABLE_XPOWER) * (double)BB_TABLE_SPACING + (double)BB_DRAPPER;
|
double Temperature = pow((double)i, (double)BB_TABLE_XPOWER) * (double)BB_TABLE_SPACING + (double)BB_DRAPER;
|
||||||
X = 0;
|
X = 0;
|
||||||
Y = 0;
|
Y = 0;
|
||||||
Z = 0;
|
Z = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user