diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-28 23:46:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-29 00:32:25 +0300 |
commit | 68cab3aff63aea95830aa082a160200768d0e826 (patch) | |
tree | 3a042217ce34d84387cdfcca97316597800396db /source/blender/gpu/shaders | |
parent | a9c297165878b3c427a20f787cc90a6ada4df253 (diff) |
Cleanup: replace attrib w/ attr
Also rename GPUVertexAttribs to GPUVertAttrLayers,
avoids confusion with GPUVertAttr which isn't closely related.
Diffstat (limited to 'source/blender/gpu/shaders')
11 files changed, 20 insertions, 20 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl index 4a9f5f94321..ea8d57b5eea 100644 --- a/source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl @@ -11,7 +11,7 @@ in vec2 pos; /* verts position in the curve tangent space */ in vec2 expand; #ifdef USE_INSTANCE -/* Instance attrib */ +/* Instance attrs. */ in vec2 P0; in vec2 P1; in vec2 P2; diff --git a/source/blender/gpu/shaders/gpu_shader_instance_camera_vert.glsl b/source/blender/gpu/shaders/gpu_shader_instance_camera_vert.glsl index 9a7815cc9d7..6a6da3dd104 100644 --- a/source/blender/gpu/shaders/gpu_shader_instance_camera_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_instance_camera_vert.glsl @@ -4,10 +4,10 @@ uniform mat4 ViewProjectionMatrix; uniform mat4 ModelMatrix; #endif -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in float pos; -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ in vec3 color; in vec4 corners[2]; /* trouble fetching vec2 */ in float depth; diff --git a/source/blender/gpu/shaders/gpu_shader_instance_distance_line_vert.glsl b/source/blender/gpu/shaders/gpu_shader_instance_distance_line_vert.glsl index 255eeb9baf1..432b6cac049 100644 --- a/source/blender/gpu/shaders/gpu_shader_instance_distance_line_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_instance_distance_line_vert.glsl @@ -1,10 +1,10 @@ uniform mat4 ViewProjectionMatrix; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in vec3 pos; -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ in vec3 color; in float start; in float end; diff --git a/source/blender/gpu/shaders/gpu_shader_instance_edges_variying_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_instance_edges_variying_color_vert.glsl index fa30c9fb1ed..9de50246a40 100644 --- a/source/blender/gpu/shaders/gpu_shader_instance_edges_variying_color_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_instance_edges_variying_color_vert.glsl @@ -16,7 +16,7 @@ uniform mat4 ProjectionMatrix; in vec3 pos; in vec3 N1, N2; // normals of faces this edge joins (object coords) -/* instance attrib */ +/* Instance attrs */ in vec3 color; in mat4 InstanceModelMatrix; diff --git a/source/blender/gpu/shaders/gpu_shader_instance_objectspace_variying_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_instance_objectspace_variying_color_vert.glsl index d2b64608eaa..087fec80537 100644 --- a/source/blender/gpu/shaders/gpu_shader_instance_objectspace_variying_color_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_instance_objectspace_variying_color_vert.glsl @@ -2,11 +2,11 @@ uniform mat4 ViewMatrix; uniform mat4 ViewProjectionMatrix; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in vec3 pos; in vec3 nor; -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ in mat4 InstanceModelMatrix; in vec4 color; @@ -17,7 +17,7 @@ void main() { mat4 ModelViewProjectionMatrix = ViewProjectionMatrix * InstanceModelMatrix; /* 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 attr. */ mat3 NormalMatrix = transpose(inverse(mat3(ViewMatrix * InstanceModelMatrix))); gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0); diff --git a/source/blender/gpu/shaders/gpu_shader_instance_screen_aligned_vert.glsl b/source/blender/gpu/shaders/gpu_shader_instance_screen_aligned_vert.glsl index f4f5b269b96..17799281f32 100644 --- a/source/blender/gpu/shaders/gpu_shader_instance_screen_aligned_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_instance_screen_aligned_vert.glsl @@ -5,10 +5,10 @@ uniform mat4 ModelMatrix; #endif uniform vec3 screen_vecs[2]; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in vec3 pos; /* using Z as axis id */ -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ in mat4 InstanceModelMatrix; in vec3 color; in float size; diff --git a/source/blender/gpu/shaders/gpu_shader_instance_screenspace_variying_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_instance_screenspace_variying_color_vert.glsl index 3baea763790..d2b85976d73 100644 --- a/source/blender/gpu/shaders/gpu_shader_instance_screenspace_variying_color_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_instance_screenspace_variying_color_vert.glsl @@ -4,10 +4,10 @@ uniform vec3 screen_vecs[2]; uniform float size; uniform float pixel_size; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in vec2 pos; -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ in vec3 world_pos; in vec3 color; diff --git a/source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl index fed00389fc1..6a55684c93c 100644 --- a/source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl @@ -2,10 +2,10 @@ uniform mat4 ViewProjectionMatrix; uniform mat4 ModelMatrix; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in vec3 pos; -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ in mat4 InstanceModelMatrix; in vec4 color; #ifdef UNIFORM_SCALE diff --git a/source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_id_vert.glsl b/source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_id_vert.glsl index f265bf9fc01..777c1498eec 100644 --- a/source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_id_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_id_vert.glsl @@ -2,10 +2,10 @@ uniform mat4 ViewProjectionMatrix; uniform int baseId; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in vec3 pos; -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ in mat4 InstanceModelMatrix; #ifdef UNIFORM_SCALE in float size; diff --git a/source/blender/gpu/shaders/gpu_shader_instance_vert.glsl b/source/blender/gpu/shaders/gpu_shader_instance_vert.glsl index a4facae435e..803dc4b3bcf 100644 --- a/source/blender/gpu/shaders/gpu_shader_instance_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_instance_vert.glsl @@ -1,10 +1,10 @@ uniform mat4 ViewProjectionMatrix; -/* ---- Instantiated Attribs ---- */ +/* ---- Instantiated Attrs ---- */ in vec3 pos; -/* ---- Per instance Attribs ---- */ +/* ---- Per instance Attrs ---- */ in mat4 InstanceModelMatrix; void main() diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index 26529dce08a..13b98080feb 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -3,7 +3,7 @@ uniform mat4 ModelViewMatrix; uniform mat4 ModelViewMatrixInverse; uniform mat3 NormalMatrix; -#ifndef ATTRIB +#ifndef USE_ATTR uniform mat4 ModelMatrix; uniform mat4 ModelMatrixInverse; #endif |