Differential D16125 Diff 56366 source/blender/draw/engines/eevee/shaders/lightprobe_cube_display_vert.glsl
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/shaders/lightprobe_cube_display_vert.glsl
| Show All 33 Lines | void main() | ||||
| int vert_id = gl_VertexID % 6; | int vert_id = gl_VertexID % 6; | ||||
| quadCoord = pos[vert_id]; | quadCoord = pos[vert_id]; | ||||
| vec3 ws_location = probes_data[pid].position_type.xyz; | vec3 ws_location = probes_data[pid].position_type.xyz; | ||||
| vec3 screen_pos = screen_vecs[0] * quadCoord.x + screen_vecs[1] * quadCoord.y; | vec3 screen_pos = screen_vecs[0] * quadCoord.x + screen_vecs[1] * quadCoord.y; | ||||
| ws_location += screen_pos * sphere_size; | ws_location += screen_pos * sphere_size; | ||||
| gl_Position = ViewProjectionMatrix * vec4(ws_location, 1.0); | gl_Position = ProjectionMatrix * (ViewMatrix * vec4(ws_location, 1.0)); | ||||
| gl_Position.z += 0.0001; /* Small bias to let the icon draw without zfighting */ | gl_Position.z += 0.0001; /* Small bias to let the icon draw without zfighting */ | ||||
| } | } | ||||