diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-08-04 22:59:38 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-08-04 22:59:38 +0300 |
commit | 396dd824285d7fb524fcc8ad8ca4cddddf2efb6d (patch) | |
tree | 7dffad11682a6ac2ec66a9598a7ebe8893b01ffb /source/blender/gpu/shaders/gpu_shader_2D_smooth_color_frag.glsl | |
parent | 797f1896fa023c0404965b987a7334448857c665 (diff) |
OpenGL: add simple shaders for 2D drawing
The first two of several new simple built-in shaders (will test these
before adding more). These are intended for the new immediate mode API,
but you can use them just like any built-in GPUShader.
Due to limitations on different platforms, shaders need to work with
GLSL versions 120, 130 and 150. Final Blender 2.8 will be pure #version
150.
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_2D_smooth_color_frag.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_2D_smooth_color_frag.glsl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_smooth_color_frag.glsl b/source/blender/gpu/shaders/gpu_shader_2D_smooth_color_frag.glsl new file mode 100644 index 00000000000..89d23e277cb --- /dev/null +++ b/source/blender/gpu/shaders/gpu_shader_2D_smooth_color_frag.glsl @@ -0,0 +1,13 @@ + +#if __VERSION__ == 120 + varying vec4 finalColor; + #define fragColor gl_FragColor +#else + noperspective in vec4 finalColor; + out vec4 fragColor; +#endif + +void main() +{ + fragColor = finalColor; +} |