[Bf-blender-cvs] [744aaa9] master: Cleanup: Typo fix for Blackbody variable, had different naming in the comments and also in OSL.

Thomas Dinges noreply at git.blender.org
Sun Oct 12 14:19:25 CEST 2014


Commit: 744aaa955f6b60e8eefb67145d15f1c42e708d2b
Author: Thomas Dinges
Date:   Sun Oct 12 14:18:30 2014 +0200
Branches: master
https://developer.blender.org/rB744aaa955f6b60e8eefb67145d15f1c42e708d2b

Cleanup: Typo fix for Blackbody variable, had different naming in the comments and also in OSL.

===================================================================

M	intern/cycles/kernel/kernel_types.h
M	intern/cycles/kernel/svm/svm_blackbody.h
M	intern/cycles/render/blackbody.cpp

===================================================================

diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h
index e5cd23c..ca1210f 100644
--- a/intern/cycles/kernel/kernel_types.h
+++ b/intern/cycles/kernel/kernel_types.h
@@ -38,7 +38,7 @@ CCL_NAMESPACE_BEGIN
 #define BSSRDF_MIN_RADIUS			1e-8f
 #define BSSRDF_MAX_HITS				4
 
-#define BB_DRAPPER				800.0f
+#define BB_DRAPER				800.0f
 #define BB_MAX_TABLE_RANGE		12000.0f
 #define BB_TABLE_XPOWER			1.5f
 #define BB_TABLE_YPOWER			5.0f
diff --git a/intern/cycles/kernel/svm/svm_blackbody.h b/intern/cycles/kernel/svm/svm_blackbody.h
index 15257ae..1e40e86 100644
--- a/intern/cycles/kernel/svm/svm_blackbody.h
+++ b/intern/cycles/kernel/svm/svm_blackbody.h
@@ -42,7 +42,7 @@ ccl_device void svm_node_blackbody(KernelGlobals *kg, ShaderData *sd, float *sta
 	/* Input */
 	float temperature = stack_load_float(stack, temperature_offset);
 
-	if (temperature < BB_DRAPPER) {
+	if (temperature < BB_DRAPER) {
 		/* just return very very dim red */
 		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
 		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;
 
diff --git a/intern/cycles/render/blackbody.cpp b/intern/cycles/render/blackbody.cpp
index 89af714..6e2cb7c 100644
--- a/intern/cycles/render/blackbody.cpp
+++ b/intern/cycles/render/blackbody.cpp
@@ -100,7 +100,7 @@ vector<float> blackbody_table()
 
 	/* ToDo: bring this back to what OSL does with the lastTemperature limit ? */
 	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;
 		Y = 0;
 		Z = 0;




More information about the Bf-blender-cvs mailing list