Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/shaders/extra_vert.glsl
| Show First 20 Lines • Show All 215 Lines • ▼ Show 20 Lines | if ((vclass & VCLASS_LIGHT_SPOT_CONE) != 0) { | ||||
| } | } | ||||
| } | } | ||||
| gl_Position = point_world_to_ndc(world_pos); | gl_Position = point_world_to_ndc(world_pos); | ||||
| /* Convert to screen position [0..sizeVp]. */ | /* Convert to screen position [0..sizeVp]. */ | ||||
| edgePos = edgeStart = ((gl_Position.xy / gl_Position.w) * 0.5 + 0.5) * sizeViewport.xy; | edgePos = edgeStart = ((gl_Position.xy / gl_Position.w) * 0.5 + 0.5) * sizeViewport.xy; | ||||
| #ifdef SELECT_EDGES | |||||
| /* HACK: to avoid loosing sub pixel object in selections, we add a bit of randomness to the | /* HACK: to avoid loosing sub pixel object in selections, we add a bit of randomness to the | ||||
| * wire to at least create one fragment that will pass the occlusion query. */ | * wire to at least create one fragment that will pass the occlusion query. */ | ||||
| /* TODO(fclem) Limit this workaround to selection. It's not very noticeable but still... */ | /* TODO(fclem) Limit this workaround to selection. It's not very noticeable but still... */ | ||||
| gl_Position.xy += sizeViewportInv.xy * gl_Position.w * ((gl_VertexID % 2 == 0) ? -1.0 : 1.0); | gl_Position.xy += sizeViewportInv.xy * gl_Position.w * ((gl_VertexID % 2 == 0) ? -1.0 : 1.0); | ||||
| #endif | |||||
| #ifdef USE_WORLD_CLIP_PLANES | #ifdef USE_WORLD_CLIP_PLANES | ||||
| world_clip_planes_calc_clip_distance(world_pos); | world_clip_planes_calc_clip_distance(world_pos); | ||||
| #endif | #endif | ||||
| } | } | ||||