diff options
author | Michael Soluyanov <crantisz> | 2020-03-23 18:00:42 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-03-23 18:35:29 +0300 |
commit | c95b522856c590e31278548ec02bbac1a64e217d (patch) | |
tree | 451ee4f970def4c34ca8cab6b4eb7081865491af /source/blender/draw/engines | |
parent | 88a86c025c0fb29b27b6caf7bd3873114e6e7c45 (diff) |
UI: Theme options for checkerboard pattern colors and size
This patch adds ability to set up colors and size of background
(transparency) checkerboard pattern in viewport and 2d editors. No new
backgrounds, only changing colors in existing ones.
This is not the background of the viewport, it is a transparency
checkerboard that is turned on only in render mode, when the
transparency mode is on. And also in 2D-editors, (image, sequencer,
etc).
Reviewed By: Pablo Vazquez, Julian Eisel
Differential Revision: https://developer.blender.org/D6791
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r-- | source/blender/draw/engines/overlay/shaders/background_frag.glsl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/overlay/shaders/background_frag.glsl b/source/blender/draw/engines/overlay/shaders/background_frag.glsl index 60fa83e1695..d5aaaf75b79 100644 --- a/source/blender/draw/engines/overlay/shaders/background_frag.glsl +++ b/source/blender/draw/engines/overlay/shaders/background_frag.glsl @@ -71,10 +71,10 @@ void main() bg_col += dither(); break; case BG_CHECKER: - float size = 8.0 * sizePixel; + float size = sizeChecker * sizePixel; ivec2 p = ivec2(floor(gl_FragCoord.xy / size)); bool check = mod(p.x, 2) == mod(p.y, 2); - bg_col = (check) ? colorCheckerLow.rgb : colorCheckerHigh.rgb; + bg_col = (check) ? colorCheckerPrimary.rgb : colorCheckerSecondary.rgb; break; } |