[Bf-blender-cvs] [98e808d7c27] hair_guides_grooming: Move parent interpolation shader to common_hair_guides_lib.glsl

Lukas Tönne noreply at git.blender.org
Sun Jun 10 09:22:29 CEST 2018


Commit: 98e808d7c27091a3d7fa9d58bb439332f3ce3aa2
Author: Lukas Tönne
Date:   Sun Jun 10 08:22:06 2018 +0100
Branches: hair_guides_grooming
https://developer.blender.org/rB98e808d7c27091a3d7fa9d58bb439332f3ce3aa2

Move parent interpolation shader to common_hair_guides_lib.glsl

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

M	source/blender/blenkernel/intern/hair_draw.c
M	source/blender/draw/CMakeLists.txt
M	source/blender/draw/engines/eevee/eevee_materials.c
M	source/blender/draw/engines/workbench/workbench_deferred.c
M	source/blender/draw/engines/workbench/workbench_forward.c
M	source/blender/draw/intern/draw_hair.c
R100	source/blender/draw/engines/eevee/shaders/hair_lib.glsl	source/blender/draw/modes/shaders/common_hair_guides_lib.glsl

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

diff --git a/source/blender/blenkernel/intern/hair_draw.c b/source/blender/blenkernel/intern/hair_draw.c
index 4135c7833c1..e070be71950 100644
--- a/source/blender/blenkernel/intern/hair_draw.c
+++ b/source/blender/blenkernel/intern/hair_draw.c
@@ -183,7 +183,7 @@ void BKE_hair_batch_cache_free(HairSystem* hsys)
 /* === Fiber Curve Interpolation === */
 
 /* NOTE: Keep this code in sync with the GLSL version!
- * see hair_lib.glsl
+ * see common_hair_guides_lib.glsl
  */
 
 static void interpolate_parent_curve(
diff --git a/source/blender/draw/CMakeLists.txt b/source/blender/draw/CMakeLists.txt
index 50d98a146c5..0a78f0bf68a 100644
--- a/source/blender/draw/CMakeLists.txt
+++ b/source/blender/draw/CMakeLists.txt
@@ -165,7 +165,6 @@ data_to_c_simple(engines/eevee/shaders/default_world_frag.glsl SRC)
 data_to_c_simple(engines/eevee/shaders/background_vert.glsl SRC)
 data_to_c_simple(engines/eevee/shaders/concentric_samples_lib.glsl SRC)
 data_to_c_simple(engines/eevee/shaders/common_uniforms_lib.glsl SRC)
-data_to_c_simple(engines/eevee/shaders/hair_lib.glsl SRC)
 data_to_c_simple(engines/eevee/shaders/lamps_lib.glsl SRC)
 data_to_c_simple(engines/eevee/shaders/lightprobe_lib.glsl SRC)
 data_to_c_simple(engines/eevee/shaders/lightprobe_filter_glossy_frag.glsl SRC)
@@ -245,6 +244,7 @@ data_to_c_simple(engines/workbench/shaders/workbench_world_light_lib.glsl SRC)
 
 data_to_c_simple(modes/shaders/common_globals_lib.glsl SRC)
 data_to_c_simple(modes/shaders/common_hair_lib.glsl SRC)
+data_to_c_simple(modes/shaders/common_hair_guides_lib.glsl SRC)
 data_to_c_simple(modes/shaders/common_hair_refine_vert.glsl SRC)
 data_to_c_simple(modes/shaders/common_view_lib.glsl SRC)
 data_to_c_simple(modes/shaders/common_fxaa_lib.glsl SRC)
diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c
index a86373a2bb4..c1deeb97832 100644
--- a/source/blender/draw/engines/eevee/eevee_materials.c
+++ b/source/blender/draw/engines/eevee/eevee_materials.c
@@ -94,6 +94,7 @@ extern char datatoc_bsdf_direct_lib_glsl[];
 extern char datatoc_bsdf_sampling_lib_glsl[];
 extern char datatoc_common_uniforms_lib_glsl[];
 extern char datatoc_common_hair_lib_glsl[];
+extern char datatoc_common_hair_guides_lib_glsl[];
 extern char datatoc_common_view_lib_glsl[];
 extern char datatoc_irradiance_lib_glsl[];
 extern char datatoc_octahedron_lib_glsl[];
@@ -110,7 +111,6 @@ extern char datatoc_volumetric_vert_glsl[];
 extern char datatoc_volumetric_geom_glsl[];
 extern char datatoc_volumetric_frag_glsl[];
 extern char datatoc_volumetric_lib_glsl[];
-extern char datatoc_hair_lib_glsl[];
 
 extern char datatoc_gpu_shader_uniform_color_frag_glsl[];
 
@@ -593,7 +593,7 @@ void EEVEE_materials_init(EEVEE_ViewLayerData *sldata, EEVEE_StorageList *stl, E
 		e_data.vert_shader_str = BLI_string_joinN(
 		        datatoc_common_view_lib_glsl,
 		        datatoc_common_hair_lib_glsl,
-		        datatoc_hair_lib_glsl,
+		        datatoc_common_hair_guides_lib_glsl,
 		        datatoc_lit_surface_vert_glsl);
 
 		e_data.default_background = DRW_shader_create(
@@ -615,7 +615,7 @@ void EEVEE_materials_init(EEVEE_ViewLayerData *sldata, EEVEE_StorageList *stl, E
 		char *hair_fiber_vert_str = BLI_string_joinN(
 		        datatoc_common_view_lib_glsl,
 		        datatoc_common_hair_lib_glsl,
-		        datatoc_hair_lib_glsl,
+		        datatoc_common_hair_guides_lib_glsl,
 		        datatoc_prepass_vert_glsl);
 
 		e_data.default_prepass_hair_fiber_sh = DRW_shader_create(
diff --git a/source/blender/draw/engines/workbench/workbench_deferred.c b/source/blender/draw/engines/workbench/workbench_deferred.c
index 3aea1b31a5a..196d4ee1a45 100644
--- a/source/blender/draw/engines/workbench/workbench_deferred.c
+++ b/source/blender/draw/engines/workbench/workbench_deferred.c
@@ -87,7 +87,7 @@ static struct {
 
 /* Shaders */
 extern char datatoc_common_hair_lib_glsl[];
-extern char datatoc_hair_lib_glsl[];
+extern char datatoc_common_hair_guides_lib_glsl[];
 
 extern char datatoc_workbench_prepass_vert_glsl[];
 extern char datatoc_workbench_prepass_frag_glsl[];
@@ -152,7 +152,7 @@ static char *workbench_build_prepass_vert(void)
 	DynStr *ds = BLI_dynstr_new();
 
 	BLI_dynstr_append(ds, datatoc_common_hair_lib_glsl);
-	BLI_dynstr_append(ds, datatoc_hair_lib_glsl);
+	BLI_dynstr_append(ds, datatoc_common_hair_guides_lib_glsl);
 	BLI_dynstr_append(ds, datatoc_workbench_prepass_vert_glsl);
 
 	str = BLI_dynstr_get_cstring(ds);
diff --git a/source/blender/draw/engines/workbench/workbench_forward.c b/source/blender/draw/engines/workbench/workbench_forward.c
index 5dd6f31c897..d45d0a3fbbe 100644
--- a/source/blender/draw/engines/workbench/workbench_forward.c
+++ b/source/blender/draw/engines/workbench/workbench_forward.c
@@ -72,7 +72,7 @@ static struct {
 
 /* Shaders */
 extern char datatoc_common_hair_lib_glsl[];
-extern char datatoc_hair_lib_glsl[];
+extern char datatoc_common_hair_guides_lib_glsl[];
 extern char datatoc_workbench_forward_composite_frag_glsl[];
 extern char datatoc_workbench_forward_depth_frag_glsl[];
 extern char datatoc_workbench_forward_transparent_accum_frag_glsl[];
@@ -109,7 +109,7 @@ static char *workbench_build_forward_vert(void)
 	DynStr *ds = BLI_dynstr_new();
 
 	BLI_dynstr_append(ds, datatoc_common_hair_lib_glsl);
-	BLI_dynstr_append(ds, datatoc_hair_lib_glsl);
+	BLI_dynstr_append(ds, datatoc_common_hair_guides_lib_glsl);
 	BLI_dynstr_append(ds, datatoc_workbench_prepass_vert_glsl);
 
 	str = BLI_dynstr_get_cstring(ds);
diff --git a/source/blender/draw/intern/draw_hair.c b/source/blender/draw/intern/draw_hair.c
index d5923419b37..863a806f59e 100644
--- a/source/blender/draw/intern/draw_hair.c
+++ b/source/blender/draw/intern/draw_hair.c
@@ -60,6 +60,7 @@ static GPUShader *g_refine_shaders[PART_REFINE_MAX_SHADER] = {NULL};
 static DRWPass *g_tf_pass; /* XXX can be a problem with mulitple DRWManager in the future */
 
 extern char datatoc_common_hair_lib_glsl[];
+extern char datatoc_common_hair_guides_lib_glsl[];
 extern char datatoc_common_hair_refine_vert_glsl[];
 
 static GPUShader *hair_refine_shader_get(ParticleRefineShader sh)
diff --git a/source/blender/draw/engines/eevee/shaders/hair_lib.glsl b/source/blender/draw/modes/shaders/common_hair_guides_lib.glsl
similarity index 100%
rename from source/blender/draw/engines/eevee/shaders/hair_lib.glsl
rename to source/blender/draw/modes/shaders/common_hair_guides_lib.glsl



More information about the Bf-blender-cvs mailing list