Differential D4921 Diff 15532 source/blender/draw/modes/shaders/edit_lattice_overlay_loosevert_vert.glsl
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/modes/shaders/edit_lattice_overlay_loosevert_vert.glsl
| Show All 16 Lines | |||||
| /* project to screen space */ | /* project to screen space */ | ||||
| vec2 proj(vec4 pos) | vec2 proj(vec4 pos) | ||||
| { | { | ||||
| return (0.5 * (pos.xy / pos.w) + 0.5) * viewportSize; | return (0.5 * (pos.xy / pos.w) + 0.5) * viewportSize; | ||||
| } | } | ||||
| void main() | void main() | ||||
| { | { | ||||
| GPU_INTEL_VERTEX_SHADER_WORKAROUND | |||||
| clipCase = 0; | clipCase = 0; | ||||
| vec3 world_pos = point_object_to_world(pos); | vec3 world_pos = point_object_to_world(pos); | ||||
| vec4 pPos = point_world_to_ndc(world_pos); | vec4 pPos = point_world_to_ndc(world_pos); | ||||
| /* only vertex position 0 is used */ | /* only vertex position 0 is used */ | ||||
| eData1 = eData2 = vec4(1e10); | eData1 = eData2 = vec4(1e10); | ||||
| eData2.zw = proj(pPos); | eData2.zw = proj(pPos); | ||||
| Show All 10 Lines | |||||