[Bf-blender-cvs] [4ee36a2aea3] blender2.8: Cleanup: line length
Campbell Barton
noreply at git.blender.org
Sat Apr 22 08:30:28 CEST 2017
Commit: 4ee36a2aea3341210503578b373afa28e667e088
Author: Campbell Barton
Date: Sat Apr 22 16:11:12 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB4ee36a2aea3341210503578b373afa28e667e088
Cleanup: line length
===================================================================
M source/blender/draw/engines/clay/clay.c
M source/blender/draw/engines/clay/shaders/clay_frag.glsl
M source/blender/draw/engines/clay/shaders/ssao_alchemy.glsl
M source/blender/draw/engines/clay/shaders/ssao_groundtruth.glsl
M source/blender/draw/engines/eevee/eevee.c
M source/blender/draw/engines/eevee/eevee_lights.c
M source/blender/draw/intern/DRW_render.h
M source/blender/draw/intern/draw_armature.c
M source/blender/draw/intern/draw_manager.c
M source/blender/draw/intern/draw_view.c
===================================================================
diff --git a/source/blender/draw/engines/clay/clay.c b/source/blender/draw/engines/clay/clay.c
index 14053c3d5ff..5b1c6045808 100644
--- a/source/blender/draw/engines/clay/clay.c
+++ b/source/blender/draw/engines/clay/clay.c
@@ -372,7 +372,8 @@ static void CLAY_engine_init(void *vedata)
/* convert the view vectors to view space */
for (i = 0; i < 3; i++) {
mul_m4_v4(invproj, viewvecs[i]);
- /* normalized trick see http://www.derschmale.com/2014/01/26/reconstructing-positions-from-the-depth-buffer */
+ /* normalized trick see:
+ * http://www.derschmale.com/2014/01/26/reconstructing-positions-from-the-depth-buffer */
mul_v3_fl(viewvecs[i], 1.0f / viewvecs[i][3]);
if (is_persp)
mul_v3_fl(viewvecs[i], 1.0f / viewvecs[i][2]);
@@ -429,9 +430,10 @@ static DRWShadingGroup *CLAY_shgroup_create(CLAY_Data *vedata, DRWPass *pass, in
return grp;
}
-static int search_mat_to_ubo(CLAY_Storage *storage, float matcap_rot, float matcap_hue, float matcap_sat,
- float matcap_val, float ssao_distance, float ssao_factor_cavity,
- float ssao_factor_edge, float ssao_attenuation, int matcap_icon)
+static int search_mat_to_ubo(
+ CLAY_Storage *storage, float matcap_rot, float matcap_hue, float matcap_sat,
+ float matcap_val, float ssao_distance, float ssao_factor_cavity,
+ float ssao_factor_edge, float ssao_attenuation, int matcap_icon)
{
/* For now just use a linear search and test all parameters */
/* TODO make a hash table */
@@ -547,7 +549,9 @@ static void CLAY_cache_init(void *vedata)
psl->depth_pass = DRW_pass_create("Depth Pass", DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
stl->g_data->depth_shgrp = DRW_shgroup_create(e_data.depth_sh, psl->depth_pass);
- psl->depth_pass_cull = DRW_pass_create("Depth Pass Cull", DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS | DRW_STATE_CULL_BACK);
+ psl->depth_pass_cull = DRW_pass_create(
+ "Depth Pass Cull",
+ DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS | DRW_STATE_CULL_BACK);
stl->g_data->depth_shgrp_cull = DRW_shgroup_create(e_data.depth_sh, psl->depth_pass_cull);
}
diff --git a/source/blender/draw/engines/clay/shaders/clay_frag.glsl b/source/blender/draw/engines/clay/shaders/clay_frag.glsl
index 35d803dc9ef..8eb0f6e7827 100644
--- a/source/blender/draw/engines/clay/shaders/clay_frag.glsl
+++ b/source/blender/draw/engines/clay/shaders/clay_frag.glsl
@@ -153,7 +153,9 @@ void hue_sat(float hue, float sat, float value, inout vec3 col)
#ifdef USE_AO
/* Prototype */
-void ssao_factors(in float depth, in vec3 normal, in vec3 position, in vec2 screenco, out float cavities, out float edges);
+void ssao_factors(
+ in float depth, in vec3 normal, in vec3 position, in vec2 screenco,
+ out float cavities, out float edges);
#endif
void main() {
diff --git a/source/blender/draw/engines/clay/shaders/ssao_alchemy.glsl b/source/blender/draw/engines/clay/shaders/ssao_alchemy.glsl
index 20903b5c871..447d1ece8f8 100644
--- a/source/blender/draw/engines/clay/shaders/ssao_alchemy.glsl
+++ b/source/blender/draw/engines/clay/shaders/ssao_alchemy.glsl
@@ -6,7 +6,9 @@
/* from The Alchemy screen-space ambient obscurance algorithm
* http://graphics.cs.williams.edu/papers/AlchemyHPG11/VV11AlchemyAO.pdf */
-void ssao_factors(in float depth, in vec3 normal, in vec3 position, in vec2 screenco, out float cavities, out float edges)
+void ssao_factors(
+ in float depth, in vec3 normal, in vec3 position, in vec2 screenco,
+ out float cavities, out float edges)
{
/* take the normalized ray direction here */
vec2 rotX = texture(ssao_jitter, screenco.xy * jitter_tilling).rg;
diff --git a/source/blender/draw/engines/clay/shaders/ssao_groundtruth.glsl b/source/blender/draw/engines/clay/shaders/ssao_groundtruth.glsl
index 2d7dbbb3e17..9c203a4246c 100644
--- a/source/blender/draw/engines/clay/shaders/ssao_groundtruth.glsl
+++ b/source/blender/draw/engines/clay/shaders/ssao_groundtruth.glsl
@@ -49,7 +49,9 @@ float get_max_horizon(in vec2 co, in vec3 x, in vec3 omega_o, in float h)
return h;
}
-void ssao_factors(in float depth, in vec3 normal, in vec3 position, in vec2 screenco, out float cavities, out float edges)
+void ssao_factors(
+ in float depth, in vec3 normal, in vec3 position, in vec2 screenco,
+ out float cavities, out float edges)
{
/* Renaming */
vec3 omega_o = -normalize(position); /* viewvec */
@@ -117,4 +119,4 @@ void ssao_factors(in float depth, in vec3 normal, in vec3 position, in vec2 scre
cavities = 1.0 - A;
edges = 0.0;
-}
\ No newline at end of file
+}
diff --git a/source/blender/draw/engines/eevee/eevee.c b/source/blender/draw/engines/eevee/eevee.c
index 0c4fbb4b46b..26e82467cd7 100644
--- a/source/blender/draw/engines/eevee/eevee.c
+++ b/source/blender/draw/engines/eevee/eevee.c
@@ -134,10 +134,11 @@ static struct GPUTexture *create_ggx_lut_texture(int UNUSED(w), int UNUSED(h))
lib_str = BLI_dynstr_get_cstring(ds_vert);
BLI_dynstr_free(ds_vert);
- struct GPUShader *sh = DRW_shader_create_with_lib(datatoc_probe_vert_glsl, datatoc_probe_geom_glsl, datatoc_bsdf_lut_frag_glsl, lib_str,
- "#define HAMMERSLEY_SIZE 8192\n"
- "#define BRDF_LUT_SIZE 64\n"
- "#define NOISE_SIZE 64\n");
+ struct GPUShader *sh = DRW_shader_create_with_lib(
+ datatoc_probe_vert_glsl, datatoc_probe_geom_glsl, datatoc_bsdf_lut_frag_glsl, lib_str,
+ "#define HAMMERSLEY_SIZE 8192\n"
+ "#define BRDF_LUT_SIZE 64\n"
+ "#define NOISE_SIZE 64\n");
DRWPass *pass = DRW_pass_create("Probe Filtering", DRW_STATE_WRITE_COLOR);
DRWShadingGroup *grp = DRW_shgroup_create(sh, pass);
@@ -221,22 +222,25 @@ static void EEVEE_engine_init(void *ved)
lib_str = BLI_dynstr_get_cstring(ds_vert);
BLI_dynstr_free(ds_vert);
- e_data.default_lit = DRW_shader_create_with_lib(datatoc_lit_surface_vert_glsl, NULL, datatoc_lit_surface_frag_glsl, lib_str,
- "#define MAX_LIGHT 128\n"
- "#define MAX_SHADOW_CUBE 42\n"
- "#define MAX_SHADOW_MAP 64\n"
- "#define MAX_SHADOW_CASCADE 8\n"
- "#define MAX_CASCADE_NUM 4\n");
+ e_data.default_lit = DRW_shader_create_with_lib(
+ datatoc_lit_surface_vert_glsl, NULL, datatoc_lit_surface_frag_glsl, lib_str,
+ "#define MAX_LIGHT 128\n"
+ "#define MAX_SHADOW_CUBE 42\n"
+ "#define MAX_SHADOW_MAP 64\n"
+ "#define MAX_SHADOW_CASCADE 8\n"
+ "#define MAX_CASCADE_NUM 4\n");
MEM_freeN(lib_str);
}
if (!e_data.shadow_sh) {
- e_data.shadow_sh = DRW_shader_create(datatoc_shadow_vert_glsl, datatoc_shadow_geom_glsl, datatoc_shadow_frag_glsl, NULL);
+ e_data.shadow_sh = DRW_shader_create(
+ datatoc_shadow_vert_glsl, datatoc_shadow_geom_glsl, datatoc_shadow_frag_glsl, NULL);
}
if (!e_data.probe_sh) {
- e_data.probe_sh = DRW_shader_create(datatoc_probe_vert_glsl, datatoc_probe_geom_glsl, datatoc_probe_frag_glsl, NULL);
+ e_data.probe_sh = DRW_shader_create(
+ datatoc_probe_vert_glsl, datatoc_probe_geom_glsl, datatoc_probe_frag_glsl, NULL);
}
if (!e_data.probe_filter_sh) {
@@ -249,9 +253,10 @@ static void EEVEE_engine_init(void *ved)
shader_str = BLI_dynstr_get_cstring(ds_frag);
BLI_dynstr_free(ds_frag);
- e_data.probe_filter_sh = DRW_shader_create(datatoc_probe_vert_glsl, datatoc_probe_geom_glsl, shader_str,
- "#define HAMMERSLEY_SIZE 8192\n"
- "#define NOISE_SIZE 64\n");
+ e_data.probe_filter_sh = DRW_shader_create(
+ datatoc_probe_vert_glsl, datatoc_probe_geom_glsl, shader_str,
+ "#define HAMMERSLEY_SIZE 8192\n"
+ "#define NOISE_SIZE 64\n");
MEM_freeN(shader_str);
}
@@ -304,7 +309,8 @@ static DRWShadingGroup *eevee_cube_shgroup(struct GPUShader *sh, DRWPass *pass,
return grp;
}
-static DRWShadingGroup *eevee_cube_shadow_shgroup(EEVEE_PassList *psl, EEVEE_StorageList *stl, struct Batch *geom, float (*obmat)[4])
+static DRWShadingGroup *eevee_cube_shadow_shgroup(
+ EEVEE_PassList *psl, EEVEE_StorageList *stl, struct Batch *geom, float (*obmat)[4])
{
DRWShadingGroup *grp = DRW_shgroup_instance_create(e_data.shadow_sh, psl->shadow_cube_pass, geom);
DRW_shgroup_uniform_block(grp, "shadow_render_block", stl->shadow_render_ubo, 0);
@@ -316,7 +322,8 @@ static DRWShadingGroup *eevee_cube_shadow_shgroup(EEVEE_PassList *psl, EEVEE_Sto
return grp;
}
-static DRWShadingGroup *eevee_cascade_shadow_shgroup(EEVEE_PassList *psl, EEVEE_StorageList *stl, struct Batch *geom, float (*obmat)[4])
+static DRWShadingGroup *eevee_cascade_shadow_shgroup(
+ EEVEE_PassList *psl, EEVEE_StorageList *stl, struct Batch *geom, float (*obmat)[4])
{
DRWShadingGroup *grp = DRW_shgroup_instance_create(e_data.shadow_sh, psl->shadow_cascade_pass, geom);
DRW_shgroup_uniform_block(grp, "shadow_render_block", stl->shadow_render_ubo, 0);
@@ -395,7 +402,9 @@ static void EEVEE_cache_init(void *vedata)
psl->depth_pass = DRW_pass_create("Depth Pass", DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
stl->g_data->depth_shgrp = DRW_shgroup_create(e_data.depth_sh, psl->depth_pass);
- psl->depth_pass_cull = DRW_pass_create("Depth Pass Cull", DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS | DRW_STATE_CULL_BACK);
+ psl->depth_pass_cull = DRW_pass_create(
+ "Depth Pass Cull",
+ DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS | DRW_STATE_CULL_BACK);
stl->g_data->depth_shgrp_cull = DRW_shgroup_create(e_data.depth_sh, psl->depth_pass_cull);
}
diff --git a/source/blender/draw/engines/eevee/eevee_lights.c b/source/blender/draw/engines/eevee/eevee_lights.c
index cb4032f198c..54a851fd3ab 100644
--- a/source/blender/draw/engines/eevee/eevee_lights.c
+++ b/source/blender/draw/engines/eevee/eevee_lights
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list