Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-05-01 03:35:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-01 03:51:10 +0300
commit63f0e150edaeea26fbcc48f62597f4f5c71cc64a (patch)
tree275c7ec1f9732fd992ce8351cf0da284211edb99 /source/blender/draw/engines/workbench
parent480a09a92f7f1f28aabb4ad84b86ddccd6580afc (diff)
Cleanup: comments (long lines) in draw
Diffstat (limited to 'source/blender/draw/engines/workbench')
-rw-r--r--source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl6
-rw-r--r--source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl3
-rw-r--r--source/blender/draw/engines/workbench/workbench_effect_dof.c7
-rw-r--r--source/blender/draw/engines/workbench/workbench_materials.c3
4 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl
index 54440f7b120..0428b0d408c 100644
--- a/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl
+++ b/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl
@@ -362,9 +362,9 @@ void main()
for (int dX = -1; dX <= 1; ++dX) {
for (int dY = -1; dY <= 1; ++dY) {
vec2 offset = vec2(float(dX), float(dY));
- /* If a pixel in the window is located at (x+dX, y+dY), put it at index (dX + R)(2R + 1) + (dY + R) of the
- * pixel array. This will fill the pixel array, with the top left pixel of the window at pixel[0] and the
- * bottom right pixel of the window at pixel[N-1]. */
+ /* If a pixel in the window is located at (x+dX, y+dY), put it at index (dX + R)(2R + 1) +
+ * (dY + R) of the pixel array. This will fill the pixel array, with the top left pixel of
+ * the window at pixel[0] and the bottom right pixel of the window at pixel[N-1]. */
v[(dX + 1) * 3 + (dY + 1)] = toVec(texture(blurTex, uv + offset * pixel_size * rad));
}
}
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl
index 26ebe7a4553..a1c269d5a65 100644
--- a/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl
+++ b/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl
@@ -64,7 +64,8 @@ float max_v3(vec3 v)
float line_unit_box_intersect_dist(vec3 lineorigin, vec3 linedirection)
{
- /* https://seblagarde.wordpress.com/2012/09/29/image-based-lighting-approaches-and-parallax-corrected-cubemap/ */
+ /* https://seblagarde.wordpress.com/2012/09/29/image-based-lighting-approaches-and-parallax-corrected-cubemap/
+ */
vec3 firstplane = (vec3(1.0) - lineorigin) / linedirection;
vec3 secondplane = (vec3(-1.0) - lineorigin) / linedirection;
vec3 furthestplane = min(firstplane, secondplane);
diff --git a/source/blender/draw/engines/workbench/workbench_effect_dof.c b/source/blender/draw/engines/workbench/workbench_effect_dof.c
index f55b744481e..3dea99a76cf 100644
--- a/source/blender/draw/engines/workbench/workbench_effect_dof.c
+++ b/source/blender/draw/engines/workbench/workbench_effect_dof.c
@@ -243,9 +243,10 @@ void workbench_dof_engine_init(WORKBENCH_Data *vedata, Object *camera)
/* TODO(fclem) deduplicate with eevee */
/* this is factor that converts to the scene scale. focal length and sensor are expressed in mm
- * unit.scale_length is how many meters per blender unit we have. We want to convert to blender units though
- * because the shader reads coordinates in world space, which is in blender units.
- * Note however that focus_distance is already in blender units and shall not be scaled here (see T48157). */
+ * unit.scale_length is how many meters per blender unit we have. We want to convert to blender
+ * units though because the shader reads coordinates in world space, which is in blender units.
+ * Note however that focus_distance is already in blender units and shall not be scaled here
+ * (see T48157). */
float scale = (scene_eval->unit.system) ? scene_eval->unit.scale_length : 1.0f;
float scale_camera = 0.001f / scale;
/* we want radius here for the aperture number */
diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c
index 6151c1f54dd..c403e358d6a 100644
--- a/source/blender/draw/engines/workbench/workbench_materials.c
+++ b/source/blender/draw/engines/workbench/workbench_materials.c
@@ -43,7 +43,8 @@ void workbench_material_update_data(WORKBENCH_PrivateData *wpd,
Material *mat,
WORKBENCH_MaterialData *data)
{
- /* When V3D_SHADING_TEXTURE_COLOR is active, use V3D_SHADING_MATERIAL_COLOR as fallback when no texture could be determined */
+ /* When V3D_SHADING_TEXTURE_COLOR is active, use V3D_SHADING_MATERIAL_COLOR as fallback when no
+ * texture could be determined */
int color_type = wpd->shading.color_type == V3D_SHADING_TEXTURE_COLOR ?
V3D_SHADING_MATERIAL_COLOR :
wpd->shading.color_type;