[Bf-blender-cvs] [ab20901c9e0] blender2.8: Cleanup: codestyle

Campbell Barton noreply at git.blender.org
Sun Jun 17 12:04:02 CEST 2018


Commit: ab20901c9e0cd30ef9c6d3ef17c8fcbc45c14352
Author: Campbell Barton
Date:   Sun Jun 17 12:03:22 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBab20901c9e0cd30ef9c6d3ef17c8fcbc45c14352

Cleanup: codestyle

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

M	intern/gawain/CMakeLists.txt
M	source/blender/blenkernel/intern/studiolight.c
M	source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl
M	source/blender/draw/engines/workbench/workbench_deferred.c
M	source/blender/draw/modes/shaders/edit_mesh_overlay_common_lib.glsl
M	source/blender/gpu/CMakeLists.txt

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

diff --git a/intern/gawain/CMakeLists.txt b/intern/gawain/CMakeLists.txt
index ced52b22e2c..7ebd3ee7622 100644
--- a/intern/gawain/CMakeLists.txt
+++ b/intern/gawain/CMakeLists.txt
@@ -1,5 +1,5 @@
 # WITH_OPENGL limits the visibility of the opengl headers to just gawain and bg_gpu,
-# to more easily highlight codepadths in other libraries that need to be refactored, 
+# to more easily highlight codepadths in other libraries that need to be refactored,
 # bf_intern_gawain is allowed to have opengl regardless of this option.
 
 if(NOT WITH_OPENGL)
diff --git a/source/blender/blenkernel/intern/studiolight.c b/source/blender/blenkernel/intern/studiolight.c
index 1735388d954..297993ae3e4 100644
--- a/source/blender/blenkernel/intern/studiolight.c
+++ b/source/blender/blenkernel/intern/studiolight.c
@@ -633,7 +633,7 @@ static uint *studiolight_radiance_preview(StudioLight *sl, int icon_size)
 				normal[0] = dx * 2.0f - 1.0f;
 				normal[1] = dy * 2.0f - 1.0f;
 				float dist = len_v2(normal);
-				normal[2] = sqrtf(1.0f - dist*dist);
+				normal[2] = sqrtf(1.0f - SQUARE(dist));
 
 				float direction[3];
 				reflect_v3_v3v3(direction, incoming, normal);
@@ -717,7 +717,7 @@ static uint *studiolight_irradiance_preview(StudioLight *sl, int icon_size)
 					normal[0] = dx * 2.0f - 1.0f;
 					normal[1] = dy * 2.0f - 1.0f;
 					float dist = len_v2(normal);
-					normal[2] = sqrtf(1.0f - dist*dist);
+					normal[2] = sqrtf(1.0f - SQUARE(dist));
 
 					float color[3];
 					mul_v3_v3fl(color, sl->diffuse_light[STUDIOLIGHT_X_POS], clamp_f(normal[0], 0.0, 1.0));
diff --git a/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl b/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl
index 69c96eed3f3..644b449c03e 100644
--- a/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl
+++ b/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl
@@ -374,7 +374,7 @@ void CLOSURE_NAME(
 		accumulate_light(trans, 1.0, refr_accum);
 	}
 	#endif
-#endif /* Specular probes */ 
+#endif /* Specular probes */
 
 
 	/* ---------------------------- */
diff --git a/source/blender/draw/engines/workbench/workbench_deferred.c b/source/blender/draw/engines/workbench/workbench_deferred.c
index bfd5ea85fbc..3bf7c34d5eb 100644
--- a/source/blender/draw/engines/workbench/workbench_deferred.c
+++ b/source/blender/draw/engines/workbench/workbench_deferred.c
@@ -423,7 +423,7 @@ void workbench_deferred_engine_init(WORKBENCH_Data *vedata)
 		DRW_shgroup_uniform_block(grp, "samples_block", e_data.sampling_ubo);
 		DRW_shgroup_call_add(grp, DRW_cache_fullscreen_quad_get(), NULL);
 	}
-	
+
 	{
 		psl->effect_fxaa_pass = DRW_pass_create("Effect FXAA", DRW_STATE_WRITE_COLOR);
 		DRWShadingGroup *grp = DRW_shgroup_create(e_data.effect_fxaa_sh, psl->effect_fxaa_pass);
diff --git a/source/blender/draw/modes/shaders/edit_mesh_overlay_common_lib.glsl b/source/blender/draw/modes/shaders/edit_mesh_overlay_common_lib.glsl
index 7caf3deaebe..b3eb55baa3a 100644
--- a/source/blender/draw/modes/shaders/edit_mesh_overlay_common_lib.glsl
+++ b/source/blender/draw/modes/shaders/edit_mesh_overlay_common_lib.glsl
@@ -52,4 +52,4 @@ vec4 EDIT_MESH_vertex_color(int vertex_flag)
 		return colorWireInactive;
 #endif
 	}
-}
\ No newline at end of file
+}
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index fe6d438924f..6829a8c0be2 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -24,7 +24,7 @@
 # ***** END GPL LICENSE BLOCK *****
 
 # WITH_OPENGL limits the visibility of the opengl headers to just gawain and bg_gpu,
-# to more easily highlight codepadths in other libraries that need to be refactored, 
+# to more easily highlight codepadths in other libraries that need to be refactored,
 # bf_gpu is allowed to have opengl regardless of this option.
 
 if(NOT WITH_OPENGL)



More information about the Bf-blender-cvs mailing list