diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-09-05 19:21:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-09-05 19:21:27 +0300 |
commit | ffec86bb62c52665ef6a05770f03ab69fa6bb231 (patch) | |
tree | 6d080aee3dc00c1145b4d009de6e0c1f47366594 /source/blender/gpu | |
parent | 3a8d9198b33d9c90abd3a134ee26e2f68ff52002 (diff) |
Cleanup: clang-format
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/opengl/gl_state.cc | 9 | ||||
-rw-r--r-- | source/blender/gpu/shaders/material/gpu_shader_material_tex_voronoi.glsl | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/gpu/opengl/gl_state.cc b/source/blender/gpu/opengl/gl_state.cc index 419cb8b0c9c..dc0317726a8 100644 --- a/source/blender/gpu/opengl/gl_state.cc +++ b/source/blender/gpu/opengl/gl_state.cc @@ -338,7 +338,7 @@ void GLStateManager::set_blend(const eGPUBlend value) /** * Factors to the equation. * SRC is fragment shader output. - * DST is framebuffer color. + * DST is frame-buffer color. * final.rgb = SRC.rgb * src_rgb + DST.rgb * dst_rgb; * final.a = SRC.a * src_alpha + DST.a * dst_alpha; **/ @@ -414,7 +414,8 @@ void GLStateManager::set_blend(const eGPUBlend value) } /* Always set the blend function. This avoid a rendering error when blending is disabled but - * GPU_BLEND_CUSTOM was used just before and the framebuffer is using more than 1 color targe */ + * GPU_BLEND_CUSTOM was used just before and the frame-buffer is using more than 1 color target. + */ glBlendFuncSeparate(src_rgb, dst_rgb, src_alpha, dst_alpha); if (value != GPU_BLEND_NONE) { glEnable(GL_BLEND); @@ -427,7 +428,7 @@ void GLStateManager::set_blend(const eGPUBlend value) /** \} */ /* -------------------------------------------------------------------- */ -/** \name Texture state managment +/** \name Texture State Management * \{ */ void GLStateManager::texture_bind(Texture *tex_, eGPUSamplerState sampler_type, int unit) @@ -455,7 +456,7 @@ void GLStateManager::texture_bind_temp(GLTexture *tex) // BLI_assert(!GLEW_ARB_direct_state_access); glActiveTexture(GL_TEXTURE0); glBindTexture(tex->target_, tex->tex_id_); - /* Will reset the first texture that was originaly bound to slot 0 back before drawing. */ + /* Will reset the first texture that was originally bound to slot 0 back before drawing. */ dirty_texture_binds_ |= 1UL; /* NOTE: This might leave this texture attached to this target even after update. * In practice it is not causing problems as we have incorrect binding detection diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_tex_voronoi.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_tex_voronoi.glsl index 470ce1a1fa7..40f76b9cacc 100644 --- a/source/blender/gpu/shaders/material/gpu_shader_material_tex_voronoi.glsl +++ b/source/blender/gpu/shaders/material/gpu_shader_material_tex_voronoi.glsl @@ -162,7 +162,8 @@ void node_tex_voronoi_distance_to_edge_1d(vec3 coord, float leftPointPosition = -1.0 + hash_float_to_float(cellPosition - 1.0) * randomness; float rightPointPosition = 1.0 + hash_float_to_float(cellPosition + 1.0) * randomness; float distanceToMidLeft = distance((midPointPosition + leftPointPosition) / 2.0, localPosition); - float distanceToMidRight = distance((midPointPosition + rightPointPosition) / 2.0, localPosition); + float distanceToMidRight = distance((midPointPosition + rightPointPosition) / 2.0, + localPosition); outDistance = min(distanceToMidLeft, distanceToMidRight); } |