diff options
Diffstat (limited to 'source/blender/draw/engines/overlay/shaders/grid_vert.glsl')
-rw-r--r-- | source/blender/draw/engines/overlay/shaders/grid_vert.glsl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/draw/engines/overlay/shaders/grid_vert.glsl b/source/blender/draw/engines/overlay/shaders/grid_vert.glsl index dd0e771ad93..6df4ead9f2a 100644 --- a/source/blender/draw/engines/overlay/shaders/grid_vert.glsl +++ b/source/blender/draw/engines/overlay/shaders/grid_vert.glsl @@ -12,7 +12,7 @@ uniform int gridFlag; #define PLANE_YZ (1 << 6) #define CLIP_Z_POS (1 << 7) #define CLIP_Z_NEG (1 << 8) - +#define PLANE_IMAGE (1 << 11) in vec3 pos; out vec3 local_pos; @@ -28,9 +28,12 @@ void main() else if ((gridFlag & PLANE_XZ) != 0) { vert_pos = vec3(pos.x, 0.0, pos.y); } - else { + else if ((gridFlag & PLANE_YZ) != 0) { vert_pos = vec3(0.0, pos.x, pos.y); } + else /* PLANE_IMAGE */ { + vert_pos = vec3(pos.xy * 0.5 + 0.5, 0.0); + } local_pos = vert_pos; |