Cleanup: GPUBuiltinShader: Remove old shader interfaces
This leaves some of the unresolved case where we still need both implementation.
This commit is contained in:
parent
aaab3c8ad4
commit
a5644f9a28
|
@ -1,11 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform vec4 color;
|
||||
uniform float scale;
|
||||
|
||||
in vec2 uv;
|
||||
|
||||
out vec4 fragColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,14 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
|
||||
uniform vec4 rect;
|
||||
uniform int cornerLen;
|
||||
uniform float scale;
|
||||
|
||||
in vec2 pos;
|
||||
|
||||
out vec2 uv;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
|
||||
in vec2 pos;
|
||||
in vec4 color;
|
||||
|
||||
flat out vec4 finalColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -3,18 +3,6 @@
|
|||
* does not need any vertex input (producing less call to immBegin/End)
|
||||
*/
|
||||
|
||||
/* Same as ICON_DRAW_CACHE_SIZE */
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
# define MAX_CALLS 16
|
||||
|
||||
uniform vec4 calls_data[MAX_CALLS * 3];
|
||||
|
||||
out vec2 texCoord_interp;
|
||||
flat out vec4 finalColor;
|
||||
|
||||
in vec2 pos;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 rect = multi_rect_data.calls_data[gl_InstanceID * 3];
|
||||
|
|
|
@ -3,14 +3,6 @@
|
|||
* does not need any vertex input (producing less call to immBegin/End)
|
||||
*/
|
||||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform vec4 rect_icon;
|
||||
uniform vec4 rect_geom;
|
||||
|
||||
out vec2 texCoord_interp;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 uv;
|
||||
|
|
|
@ -1,14 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
in float colorGradient;
|
||||
in vec4 finalColor;
|
||||
in float lineU;
|
||||
flat in float lineLength;
|
||||
flat in float dashFactor;
|
||||
flat in float dashAlpha;
|
||||
flat in int isMainLine;
|
||||
|
||||
out vec4 fragColor;
|
||||
#endif
|
||||
|
||||
#define DASH_WIDTH 10.0
|
||||
#define ANTIALIAS 1.0
|
||||
|
|
|
@ -1,12 +1,4 @@
|
|||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform float size;
|
||||
|
||||
in vec2 pos;
|
||||
out vec2 radii;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform float size;
|
||||
uniform float outlineWidth;
|
||||
|
||||
in vec2 pos;
|
||||
out vec4 radii;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
|
||||
in vec2 pos;
|
||||
in float size;
|
||||
in vec4 color;
|
||||
out vec4 finalColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
#pragma BLENDER_REQUIRE(gpu_shader_colorspace_lib.glsl)
|
||||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
noperspective in vec4 finalColor;
|
||||
out vec4 fragColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = finalColor;
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
|
||||
in vec2 pos;
|
||||
in vec4 color;
|
||||
|
||||
noperspective out vec4 finalColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,15 +1,4 @@
|
|||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
|
||||
# ifdef UV_POS
|
||||
in vec2 u;
|
||||
# define pos u
|
||||
# else
|
||||
in vec2 pos;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform mat4 ModelMatrix;
|
||||
uniform vec4 ClipPlane;
|
||||
|
||||
in vec3 pos;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
#pragma BLENDER_REQUIRE(gpu_shader_cfg_world_clip_lib.glsl)
|
||||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
# ifdef USE_WORLD_CLIP_PLANES
|
||||
uniform mat4 ModelMatrix;
|
||||
# endif
|
||||
|
||||
in vec3 pos;
|
||||
in vec4 color;
|
||||
|
||||
flat out vec4 finalColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 pos_4d = vec4(pos, 1.0);
|
||||
|
|
|
@ -1,12 +1,4 @@
|
|||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
|
||||
in vec2 texCoord;
|
||||
in vec3 pos;
|
||||
out vec2 texCoord_interp;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(pos.xyz, 1.0f);
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform mat3 NormalMatrix;
|
||||
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
out vec3 normal;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
# ifdef USE_WORLD_CLIP_PLANES
|
||||
uniform mat4 ModelMatrix;
|
||||
# endif
|
||||
|
||||
/* Does Nothing */
|
||||
in vec3 pos;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
|
||||
in vec3 pos;
|
||||
in vec4 color;
|
||||
out vec4 finalColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,16 +1,5 @@
|
|||
#pragma BLENDER_REQUIRE(gpu_shader_cfg_world_clip_lib.glsl)
|
||||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
# ifdef USE_WORLD_CLIP_PLANES
|
||||
uniform mat4 ModelMatrix;
|
||||
# endif
|
||||
uniform float size;
|
||||
|
||||
in vec3 pos;
|
||||
out vec2 radii;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 pos_4d = vec4(pos, 1.0);
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
|
||||
in vec3 pos;
|
||||
in float size;
|
||||
in vec4 color;
|
||||
out vec4 finalColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
#pragma BLENDER_REQUIRE(gpu_shader_colorspace_lib.glsl)
|
||||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
in vec4 finalColor;
|
||||
out vec4 fragColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = finalColor;
|
||||
|
|
|
@ -1,18 +1,5 @@
|
|||
#pragma BLENDER_REQUIRE(gpu_shader_cfg_world_clip_lib.glsl)
|
||||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
|
||||
# ifdef USE_WORLD_CLIP_PLANES
|
||||
uniform mat4 ModelMatrix;
|
||||
# endif
|
||||
|
||||
in vec3 pos;
|
||||
in vec4 color;
|
||||
|
||||
out vec4 finalColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
#pragma BLENDER_REQUIRE(gpu_shader_cfg_world_clip_lib.glsl)
|
||||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
|
||||
# ifdef USE_WORLD_CLIP_PLANES
|
||||
uniform mat4 ModelMatrix;
|
||||
# endif
|
||||
|
||||
in vec3 pos;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform vec4 color1;
|
||||
uniform vec4 color2;
|
||||
uniform int size;
|
||||
|
||||
out vec4 fragColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform vec4 color1;
|
||||
uniform vec4 color2;
|
||||
uniform int size1;
|
||||
uniform int size2;
|
||||
|
||||
out vec4 fragColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
flat in vec4 finalColor;
|
||||
out vec4 fragColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
#pragma BLENDER_REQUIRE(gpu_shader_colorspace_lib.glsl)
|
||||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
flat in vec4 finalColor;
|
||||
out vec4 fragColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = finalColor;
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
flat in uint finalId;
|
||||
out uint fragId;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ProjectionMatrix;
|
||||
|
||||
uniform int PrimitiveIdBase;
|
||||
uniform int osd_active_uv_offset;
|
||||
|
||||
layout(lines_adjacency) in;
|
||||
layout(triangle_strip, max_vertices = 4) out;
|
||||
|
||||
in block
|
||||
{
|
||||
VertexData v;
|
||||
}
|
||||
inpt[];
|
||||
|
||||
/* compatibility */
|
||||
out vec3 varnormal;
|
||||
out vec3 varposition;
|
||||
|
||||
uniform bool osd_flat_shading;
|
||||
uniform int osd_fvar_count;
|
||||
#endif
|
||||
|
||||
#define INTERP_FACE_VARYING_2(result, fvarOffset, tessCoord) \
|
||||
{ \
|
||||
|
@ -39,11 +17,6 @@ uniform int osd_fvar_count;
|
|||
result = vec3(tmp, 0); \
|
||||
}
|
||||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform samplerBuffer FVarDataBuffer;
|
||||
uniform isamplerBuffer FVarDataOffsetBuffer;
|
||||
#endif
|
||||
|
||||
out block
|
||||
{
|
||||
VertexData v;
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
in vec4 mColor;
|
||||
in vec2 mTexCoord;
|
||||
|
||||
out vec4 fragColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,20 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform vec2 Viewport;
|
||||
uniform int xraymode;
|
||||
uniform int caps_start;
|
||||
uniform int caps_end;
|
||||
uniform int fill_stroke;
|
||||
|
||||
layout(lines_adjacency) in;
|
||||
layout(triangle_strip, max_vertices = 13) out;
|
||||
|
||||
in vec4 finalColor[4];
|
||||
in float finalThickness[4];
|
||||
|
||||
out vec4 mColor;
|
||||
out vec2 mTexCoord;
|
||||
#endif
|
||||
|
||||
#define GP_XRAY_FRONT 0
|
||||
#define GP_XRAY_3DSPACE 1
|
||||
|
|
|
@ -1,19 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform mat4 ProjectionMatrix;
|
||||
|
||||
uniform float pixsize; /* rv3d->pixsize */
|
||||
uniform int keep_size;
|
||||
uniform float objscale;
|
||||
uniform float pixfactor;
|
||||
|
||||
in vec3 pos;
|
||||
in vec4 color;
|
||||
in float thickness;
|
||||
|
||||
out vec4 finalColor;
|
||||
out float finalThickness;
|
||||
#endif
|
||||
|
||||
float defaultpixsize = gpencil_stroke_data.pixsize * (1000.0 / gpencil_stroke_data.pixfactor);
|
||||
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
in vec2 texCoord_interp;
|
||||
out vec4 fragColor;
|
||||
|
||||
uniform vec4 color;
|
||||
uniform sampler2D image;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform float factor;
|
||||
in vec2 texCoord_interp;
|
||||
out vec4 fragColor;
|
||||
|
||||
uniform vec4 color;
|
||||
uniform sampler2D image;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
in vec2 texCoord_interp;
|
||||
out vec4 fragColor;
|
||||
|
||||
uniform sampler2D image;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,12 +1,4 @@
|
|||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
in vec2 texCoord_interp;
|
||||
out vec4 fragColor;
|
||||
|
||||
uniform float alpha;
|
||||
uniform sampler2D image;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = texture(image, texCoord_interp);
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
in vec2 texCoord_interp;
|
||||
out vec4 fragColor;
|
||||
|
||||
uniform sampler2D image;
|
||||
uniform vec4 color;
|
||||
uniform vec4 shuffle;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
in vec2 texCoord_interp;
|
||||
flat in vec4 finalColor;
|
||||
out vec4 fragColor;
|
||||
|
||||
uniform sampler2D image;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,20 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ViewProjectionMatrix;
|
||||
|
||||
/* ---- Instantiated Attrs ---- */
|
||||
in vec3 pos;
|
||||
|
||||
/* ---- Per instance Attrs ---- */
|
||||
in mat4 InstanceModelMatrix;
|
||||
in vec4 color;
|
||||
# ifdef UNIFORM_SCALE
|
||||
in float size;
|
||||
# else
|
||||
in vec3 size;
|
||||
# endif
|
||||
|
||||
flat out vec4 finalColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -11,18 +11,6 @@
|
|||
#define GPU_KEYFRAME_SHAPE_SQUARE \
|
||||
(GPU_KEYFRAME_SHAPE_CLIPPED_VERTICAL | GPU_KEYFRAME_SHAPE_CLIPPED_HORIZONTAL)
|
||||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
flat in vec4 radii;
|
||||
flat in vec4 thresholds;
|
||||
|
||||
flat in vec4 finalColor;
|
||||
flat in vec4 finalOutlineColor;
|
||||
|
||||
flat in int finalFlags;
|
||||
|
||||
out vec4 fragColor;
|
||||
#endif
|
||||
|
||||
const float diagonal_scale = sqrt(0.5);
|
||||
|
||||
const float minmax_bias = 0.7;
|
||||
|
|
|
@ -16,26 +16,6 @@ const float circle_scale = sqrt(2.0 / 3.1416);
|
|||
const float square_scale = sqrt(0.5);
|
||||
const float diagonal_scale = sqrt(0.5);
|
||||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform vec2 ViewportSize = vec2(-1, -1);
|
||||
uniform float outline_scale = 1.0;
|
||||
|
||||
in vec2 pos;
|
||||
in float size;
|
||||
in vec4 color;
|
||||
in vec4 outlineColor;
|
||||
in int flags;
|
||||
|
||||
flat out vec4 finalColor;
|
||||
flat out vec4 finalOutlineColor;
|
||||
|
||||
flat out int finalFlags;
|
||||
|
||||
flat out vec4 radii;
|
||||
flat out vec4 thresholds;
|
||||
#endif
|
||||
|
||||
bool test(int bit)
|
||||
{
|
||||
return (flags & bit) != 0;
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform vec4 color;
|
||||
|
||||
in vec2 radii;
|
||||
out vec4 fragColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform vec4 color;
|
||||
uniform vec4 outlineColor;
|
||||
|
||||
in vec4 radii;
|
||||
out vec4 fragColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
in vec4 finalColor;
|
||||
out vec4 fragColor;
|
||||
|
||||
# if defined(VERT)
|
||||
in float vertexCrease;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
in vec4 radii;
|
||||
in vec4 fillColor;
|
||||
in vec4 outlineColor;
|
||||
out vec4 fragColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,16 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
# ifndef USE_INSTANCE_COLOR
|
||||
uniform vec4 color;
|
||||
# endif
|
||||
uniform vec3 light;
|
||||
|
||||
in vec3 normal;
|
||||
# ifdef USE_INSTANCE_COLOR
|
||||
flat in vec4 finalColor;
|
||||
# define color finalColor
|
||||
# endif
|
||||
out vec4 fragColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
#pragma BLENDER_REQUIRE(gpu_shader_colorspace_lib.glsl)
|
||||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
flat in vec4 color_flat;
|
||||
noperspective in vec2 texCoord_interp;
|
||||
flat in int glyph_offset;
|
||||
flat in ivec2 glyph_dim;
|
||||
flat in int interp_size;
|
||||
|
||||
out vec4 fragColor;
|
||||
|
||||
uniform sampler2D glyph;
|
||||
#endif
|
||||
|
||||
const vec2 offsets4[4] = vec2[4](
|
||||
vec2(-0.5, 0.5), vec2(0.5, 0.5), vec2(-0.5, -0.5), vec2(-0.5, -0.5));
|
||||
|
||||
|
|
|
@ -1,17 +1,3 @@
|
|||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
|
||||
in vec4 pos; /* rect */
|
||||
in vec4 col;
|
||||
in int offset;
|
||||
in ivec2 glyph_size;
|
||||
|
||||
flat out vec4 color_flat;
|
||||
noperspective out vec2 texCoord_interp;
|
||||
flat out int glyph_offset;
|
||||
flat out ivec2 glyph_dim;
|
||||
flat out int interp_size;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
#pragma BLENDER_REQUIRE(gpu_shader_colorspace_lib.glsl)
|
||||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform vec4 color;
|
||||
out vec4 fragColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = blender_srgb_to_framebuffer_space(color);
|
||||
|
|
Loading…
Reference in New Issue