Differential D16125 Diff 56366 source/blender/draw/engines/overlay/shaders/overlay_motion_path_line_vert_no_geom.glsl
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/shaders/overlay_motion_path_line_vert_no_geom.glsl
| Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | void main() | ||||
| * | * | ||||
| * Note: Primitive is LineStrip for this shader. */ | * Note: Primitive is LineStrip for this shader. */ | ||||
| int base_vertex_id = quad_id; | int base_vertex_id = quad_id; | ||||
| /* Fetch attributes for self and neighbouring vertex. */ | /* Fetch attributes for self and neighbouring vertex. */ | ||||
| vec3 in_pos0 = vertex_fetch_attribute(base_vertex_id, pos, vec3); | vec3 in_pos0 = vertex_fetch_attribute(base_vertex_id, pos, vec3); | ||||
| vec3 in_pos1 = vertex_fetch_attribute(base_vertex_id + 1, pos, vec3); | vec3 in_pos1 = vertex_fetch_attribute(base_vertex_id + 1, pos, vec3); | ||||
| vec4 out_pos0 = ViewProjectionMatrix * vec4(in_pos0, 1.0); | vec4 out_pos0 = ProjectionMatrix * (ViewMatrix * vec4(in_pos0, 1.0)); | ||||
| vec4 out_pos1 = ViewProjectionMatrix * vec4(in_pos1, 1.0); | vec4 out_pos1 = ProjectionMatrix * (ViewMatrix * vec4(in_pos1, 1.0)); | ||||
| /* Final calculations required for Geometry Shader alternative. | /* Final calculations required for Geometry Shader alternative. | ||||
| * We need to calculate values for each vertex position to correctly determine the final output | * We need to calculate values for each vertex position to correctly determine the final output | ||||
| * position. */ | * position. */ | ||||
| vec2 ssPos[2]; | vec2 ssPos[2]; | ||||
| vec4 finalColor_geom[2]; | vec4 finalColor_geom[2]; | ||||
| do_vertex_shader(out_pos0, base_vertex_id, ssPos[0], finalColor_geom[0]); | do_vertex_shader(out_pos0, base_vertex_id, ssPos[0], finalColor_geom[0]); | ||||
| ▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines | |||||