diff options
Diffstat (limited to 'source/blender/draw/modes/shaders')
16 files changed, 30 insertions, 30 deletions
diff --git a/source/blender/draw/modes/shaders/armature_axes_vert.glsl b/source/blender/draw/modes/shaders/armature_axes_vert.glsl index 53b2a3d3b3b..137bcff1ed1 100644 --- a/source/blender/draw/modes/shaders/armature_axes_vert.glsl +++ b/source/blender/draw/modes/shaders/armature_axes_vert.glsl @@ -2,12 +2,12 @@ uniform mat4 ViewProjectionMatrix; uniform vec3 screenVecs[3]; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in float axis; /* position on the axis. [0.0-1.0] is X axis, [1.0-2.0] is Y, etc... */ in vec2 screenPos; in vec3 colorAxis; -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ in mat4 InstanceModelMatrix; in vec4 color; diff --git a/source/blender/draw/modes/shaders/armature_dof_vert.glsl b/source/blender/draw/modes/shaders/armature_dof_vert.glsl index 5c89cf644d6..d9d56862140 100644 --- a/source/blender/draw/modes/shaders/armature_dof_vert.glsl +++ b/source/blender/draw/modes/shaders/armature_dof_vert.glsl @@ -1,10 +1,10 @@ uniform mat4 ViewProjectionMatrix; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in vec2 pos; -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ /* Assumed to be in world coordinate already. */ in mat4 InstanceModelMatrix; in vec4 color; diff --git a/source/blender/draw/modes/shaders/armature_envelope_outline_vert.glsl b/source/blender/draw/modes/shaders/armature_envelope_outline_vert.glsl index 307c7276184..b170b4f41e2 100644 --- a/source/blender/draw/modes/shaders/armature_envelope_outline_vert.glsl +++ b/source/blender/draw/modes/shaders/armature_envelope_outline_vert.glsl @@ -7,12 +7,12 @@ uniform mat4 ProjectionMatrix; uniform vec2 viewportSize; uniform float lineThickness = 2.0; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in vec2 pos0; in vec2 pos1; in vec2 pos2; -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ /* Assumed to be in world coordinate already. */ in vec4 headSphere; in vec4 tailSphere; diff --git a/source/blender/draw/modes/shaders/armature_envelope_solid_vert.glsl b/source/blender/draw/modes/shaders/armature_envelope_solid_vert.glsl index 11935e9001f..01e77837201 100644 --- a/source/blender/draw/modes/shaders/armature_envelope_solid_vert.glsl +++ b/source/blender/draw/modes/shaders/armature_envelope_solid_vert.glsl @@ -3,10 +3,10 @@ uniform mat4 ViewMatrix; uniform mat4 ViewMatrixInverse; uniform mat4 ViewProjectionMatrix; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in vec3 pos; -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ /* Assumed to be in world coordinate already. */ in vec4 headSphere; in vec4 tailSphere; diff --git a/source/blender/draw/modes/shaders/armature_shape_outline_vert.glsl b/source/blender/draw/modes/shaders/armature_shape_outline_vert.glsl index 7619d8018f9..27b75852a16 100644 --- a/source/blender/draw/modes/shaders/armature_shape_outline_vert.glsl +++ b/source/blender/draw/modes/shaders/armature_shape_outline_vert.glsl @@ -5,11 +5,11 @@ uniform mat4 ViewMatrix; uniform mat4 ProjectionMatrix; uniform vec2 viewportSize; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in vec3 pos; in vec3 snor; -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ in mat4 InstanceModelMatrix; in vec4 outlineColorSize; @@ -28,7 +28,7 @@ vec2 proj(vec4 pos) void main() { /* This is slow and run per vertex, but it's still faster than - * doing it per instance on CPU and sending it on via instance attrib */ + * doing it per instance on CPU and sending it on via instance attribute. */ mat3 NormalMatrix = transpose(inverse(mat3(ViewMatrix * InstanceModelMatrix))); vec4 viewpos = ViewMatrix * (InstanceModelMatrix * vec4(pos, 1.0)); diff --git a/source/blender/draw/modes/shaders/armature_shape_solid_vert.glsl b/source/blender/draw/modes/shaders/armature_shape_solid_vert.glsl index 7abbf7f3d25..4dfd542710b 100644 --- a/source/blender/draw/modes/shaders/armature_shape_solid_vert.glsl +++ b/source/blender/draw/modes/shaders/armature_shape_solid_vert.glsl @@ -6,11 +6,11 @@ uniform mat4 ViewProjectionMatrix; uniform mat4 ViewMatrix; uniform mat4 ProjectionMatrix; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in vec3 pos; in vec3 nor; -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ in mat4 InstanceModelMatrix; in vec3 boneColor; in vec3 stateColor; diff --git a/source/blender/draw/modes/shaders/armature_sphere_outline_vert.glsl b/source/blender/draw/modes/shaders/armature_sphere_outline_vert.glsl index 0c1fefbf814..ea3cfc9a9ac 100644 --- a/source/blender/draw/modes/shaders/armature_sphere_outline_vert.glsl +++ b/source/blender/draw/modes/shaders/armature_sphere_outline_vert.glsl @@ -4,11 +4,11 @@ uniform mat4 ProjectionMatrix; uniform vec2 viewportSize; uniform float lineThickness = 2.0; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in vec2 pos0; in vec2 pos1; -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ in mat4 InstanceModelMatrix; in vec4 outlineColorSize; diff --git a/source/blender/draw/modes/shaders/armature_sphere_solid_vert.glsl b/source/blender/draw/modes/shaders/armature_sphere_solid_vert.glsl index 7cbc0c5bc3a..5ecc1569e85 100644 --- a/source/blender/draw/modes/shaders/armature_sphere_solid_vert.glsl +++ b/source/blender/draw/modes/shaders/armature_sphere_solid_vert.glsl @@ -2,10 +2,10 @@ uniform mat4 ViewMatrix; uniform mat4 ProjectionMatrix; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in vec2 pos; -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ in mat4 InstanceModelMatrix; in vec3 stateColor; in vec3 boneColor; diff --git a/source/blender/draw/modes/shaders/armature_stick_vert.glsl b/source/blender/draw/modes/shaders/armature_stick_vert.glsl index 58fc48e608e..c27b8d34ec6 100644 --- a/source/blender/draw/modes/shaders/armature_stick_vert.glsl +++ b/source/blender/draw/modes/shaders/armature_stick_vert.glsl @@ -4,7 +4,7 @@ uniform mat4 ViewProjectionMatrix; uniform mat4 ViewMatrix; uniform vec2 viewportSize; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in vec2 pos; /* bone aligned screen space */ in uint flag; @@ -17,7 +17,7 @@ in uint flag; #define POS_TAIL 32u /* (1 << 5) */ /* UNUSED */ #define POS_BONE 64u /* (1 << 6) */ -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ in vec3 boneStart; in vec3 boneEnd; in vec4 wireColor; /* alpha encode if we do wire. If 0.0 we dont. */ diff --git a/source/blender/draw/modes/shaders/common_hair_lib.glsl b/source/blender/draw/modes/shaders/common_hair_lib.glsl index 594a7b31f0b..359e4d87b7a 100644 --- a/source/blender/draw/modes/shaders/common_hair_lib.glsl +++ b/source/blender/draw/modes/shaders/common_hair_lib.glsl @@ -71,7 +71,7 @@ int hair_get_base_id(float local_time, int strand_segments, out float interp_tim return int(ratio); } -void hair_get_interp_attribs(out vec4 data0, out vec4 data1, out vec4 data2, out vec4 data3, out float interp_time) +void hair_get_interp_attrs(out vec4 data0, out vec4 data1, out vec4 data2, out vec4 data3, out float interp_time) { float local_time = float(gl_VertexID % hairStrandsRes) / float(hairStrandsRes - 1); diff --git a/source/blender/draw/modes/shaders/common_hair_refine_vert.glsl b/source/blender/draw/modes/shaders/common_hair_refine_vert.glsl index 9f412c57db3..7fe9fee5182 100644 --- a/source/blender/draw/modes/shaders/common_hair_refine_vert.glsl +++ b/source/blender/draw/modes/shaders/common_hair_refine_vert.glsl @@ -48,7 +48,7 @@ void main(void) { float interp_time; vec4 data0, data1, data2, data3; - hair_get_interp_attribs(data0, data1, data2, data3, interp_time); + hair_get_interp_attrs(data0, data1, data2, data3, interp_time); vec4 weights = get_weights_cardinal(interp_time); outData = interp_data(data0, data1, data2, data3, weights); diff --git a/source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl b/source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl index e4baa57ac8f..49097831811 100644 --- a/source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl +++ b/source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl @@ -182,7 +182,7 @@ void main() #endif /* Remember that we are assuming the last vertex - * of a triangle is the provoking vertex (decide what flat attribs are). */ + * of a triangle is the provoking vertex (decide what flat attributes are). */ if ((eflag[2] & EDGE_EXISTS) != 0) { /* Do 0 -> 1 edge strip */ diff --git a/source/blender/draw/modes/shaders/object_empty_axes_vert.glsl b/source/blender/draw/modes/shaders/object_empty_axes_vert.glsl index d4d7f9be582..4aafceeb437 100644 --- a/source/blender/draw/modes/shaders/object_empty_axes_vert.glsl +++ b/source/blender/draw/modes/shaders/object_empty_axes_vert.glsl @@ -4,11 +4,11 @@ uniform mat4 ModelMatrix; uniform vec3 screenVecs[3]; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in float axis; /* position on the axis. [0.0-1.0] is X axis, [1.0-2.0] is Y, etc... */ in vec2 screenPos; -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ in vec3 color; in float size; in mat4 InstanceModelMatrix; diff --git a/source/blender/draw/modes/shaders/object_mball_handles_vert.glsl b/source/blender/draw/modes/shaders/object_mball_handles_vert.glsl index b1c10feb62c..294a95db381 100644 --- a/source/blender/draw/modes/shaders/object_mball_handles_vert.glsl +++ b/source/blender/draw/modes/shaders/object_mball_handles_vert.glsl @@ -7,10 +7,10 @@ uniform mat4 ViewProjectionMatrix; uniform vec3 screen_vecs[2]; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in vec2 pos; -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ in mat3x4 ScaleTranslationMatrix; in float radius; in vec3 color; diff --git a/source/blender/draw/modes/shaders/paint_vertex_frag.glsl b/source/blender/draw/modes/shaders/paint_vertex_frag.glsl index 3ff264a5e22..6dd97b36ee7 100644 --- a/source/blender/draw/modes/shaders/paint_vertex_frag.glsl +++ b/source/blender/draw/modes/shaders/paint_vertex_frag.glsl @@ -4,7 +4,7 @@ in vec3 finalColor; out vec4 fragColor; uniform float white_factor = 1.0; -vec3 linear_to_srgb_attrib(vec3 c) { +vec3 linear_to_srgb_attr(vec3 c) { c = max(c, vec3(0.0)); vec3 c1 = c * 12.92; vec3 c2 = 1.055 * pow(c, vec3(1.0 / 2.4)) - 0.055; @@ -13,6 +13,6 @@ vec3 linear_to_srgb_attrib(vec3 c) { void main() { - fragColor.rgb = mix(linear_to_srgb_attrib(finalColor), vec3(1.0), white_factor); + fragColor.rgb = mix(linear_to_srgb_attr(finalColor), vec3(1.0), white_factor); fragColor.a = 1.0; } diff --git a/source/blender/draw/modes/shaders/paint_vertex_vert.glsl b/source/blender/draw/modes/shaders/paint_vertex_vert.glsl index 7d2a20ad427..39f59a29756 100644 --- a/source/blender/draw/modes/shaders/paint_vertex_vert.glsl +++ b/source/blender/draw/modes/shaders/paint_vertex_vert.glsl @@ -7,7 +7,7 @@ in vec3 c; /* active color */ out vec3 finalColor; -vec3 srgb_to_linear_attrib(vec3 c) { +vec3 srgb_to_linear_attr(vec3 c) { c = max(c, vec3(0.0)); vec3 c1 = c * (1.0 / 12.92); vec3 c2 = pow((c + 0.055) * (1.0 / 1.055), vec3(2.4)); @@ -18,7 +18,7 @@ void main() { gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0); - finalColor = srgb_to_linear_attrib(c); + finalColor = srgb_to_linear_attr(c); #ifdef USE_WORLD_CLIP_PLANES world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz); |