KiCad PCB EDA Suite
KIGFX::BUILTIN_SHADERS Namespace Reference

Variables

const char kicad_vertex_shader []
 
const char kicad_fragment_shader []
 
const char ssaa_x4_vertex_shader []
 
const char ssaa_x4_fragment_shader []
 
const char smaa_base_shader_p1 []
 
const char smaa_base_shader_p2 []
 
const char smaa_base_shader_p3 []
 
const char smaa_base_shader_p4 []
 
const char smaa_pass_1_vertex_shader []
 
const char smaa_pass_1_fragment_shader []
 
const char smaa_pass_2_vertex_shader []
 
const char smaa_pass_2_fragment_shader []
 
const char smaa_pass_3_vertex_shader []
 
const char smaa_pass_3_fragment_shader []
 

Variable Documentation

const char KIGFX::BUILTIN_SHADERS::kicad_fragment_shader

Definition at line 136 of file gl_builtin_shaders.cpp.

Referenced by KIGFX::OPENGL_GAL::init().

const char KIGFX::BUILTIN_SHADERS::kicad_vertex_shader

Definition at line 35 of file gl_builtin_shaders.cpp.

Referenced by KIGFX::OPENGL_GAL::init().

const char KIGFX::BUILTIN_SHADERS::smaa_base_shader_p1

Definition at line 282 of file gl_builtin_shaders.cpp.

Referenced by KIGFX::ANTIALIASING_SMAA::loadShaders().

const char KIGFX::BUILTIN_SHADERS::smaa_base_shader_p2

Definition at line 657 of file gl_builtin_shaders.cpp.

Referenced by KIGFX::ANTIALIASING_SMAA::loadShaders().

const char KIGFX::BUILTIN_SHADERS::smaa_base_shader_p3

Definition at line 39 of file gl_builtin_shaders.h.

Referenced by KIGFX::ANTIALIASING_SMAA::loadShaders().

const char KIGFX::BUILTIN_SHADERS::smaa_base_shader_p4

Definition at line 40 of file gl_builtin_shaders.h.

Referenced by KIGFX::ANTIALIASING_SMAA::loadShaders().

const char KIGFX::BUILTIN_SHADERS::smaa_pass_1_fragment_shader
Initial value:
= R"SHADER_SOURCE(
varying vec2 texcoord;
varying vec4 offset[3];
uniform sampler2D colorTex;
void main()
{
gl_FragColor.xy = SMAALumaEdgeDetectionPS(texcoord, offset, colorTex).xy;
}
)SHADER_SOURCE"

Definition at line 1683 of file gl_builtin_shaders.cpp.

Referenced by KIGFX::ANTIALIASING_SMAA::loadShaders().

const char KIGFX::BUILTIN_SHADERS::smaa_pass_1_vertex_shader
Initial value:
= R"SHADER_SOURCE(
varying vec4 offset[3];
varying vec2 texcoord;
void main()
{
texcoord = gl_MultiTexCoord0.st;
SMAAEdgeDetectionVS( texcoord, offset);
gl_Position = ftransform();
}
)SHADER_SOURCE"

Definition at line 1668 of file gl_builtin_shaders.cpp.

Referenced by KIGFX::ANTIALIASING_SMAA::loadShaders().

const char KIGFX::BUILTIN_SHADERS::smaa_pass_2_fragment_shader
Initial value:
= R"SHADER_SOURCE(
varying vec2 texcoord;
varying vec2 pixcoord;
varying vec4 offset[3];
uniform sampler2D edgesTex;
uniform sampler2D areaTex;
uniform sampler2D searchTex;
void main()
{
gl_FragColor = SMAABlendingWeightCalculationPS(texcoord, pixcoord, offset, edgesTex, areaTex, searchTex, vec4(0.,0.,0.,0.));
}
)SHADER_SOURCE"

Definition at line 1711 of file gl_builtin_shaders.cpp.

Referenced by KIGFX::ANTIALIASING_SMAA::loadShaders().

const char KIGFX::BUILTIN_SHADERS::smaa_pass_2_vertex_shader
Initial value:
= R"SHADER_SOURCE(
varying vec4 offset[3];
varying vec2 texcoord;
varying vec2 pixcoord;
void main()
{
texcoord = gl_MultiTexCoord0.st;
SMAABlendingWeightCalculationVS( texcoord, pixcoord, offset );
gl_Position = ftransform();
}
)SHADER_SOURCE"

Definition at line 1696 of file gl_builtin_shaders.cpp.

Referenced by KIGFX::ANTIALIASING_SMAA::loadShaders().

const char KIGFX::BUILTIN_SHADERS::smaa_pass_3_fragment_shader
Initial value:
= R"SHADER_SOURCE(
varying vec2 texcoord;
varying vec4 offset;
uniform sampler2D colorTex;
uniform sampler2D blendTex;
void main()
{
gl_FragColor = SMAANeighborhoodBlendingPS(texcoord, offset, colorTex, blendTex);
}
)SHADER_SOURCE"

Definition at line 1741 of file gl_builtin_shaders.cpp.

Referenced by KIGFX::ANTIALIASING_SMAA::loadShaders().

const char KIGFX::BUILTIN_SHADERS::smaa_pass_3_vertex_shader
Initial value:
= R"SHADER_SOURCE(
varying vec4 offset;
varying vec2 texcoord;
void main()
{
texcoord = gl_MultiTexCoord0.st;
SMAANeighborhoodBlendingVS( texcoord, offset );
gl_Position = ftransform();
}
)SHADER_SOURCE"

Definition at line 1727 of file gl_builtin_shaders.cpp.

Referenced by KIGFX::ANTIALIASING_SMAA::loadShaders().

const char KIGFX::BUILTIN_SHADERS::ssaa_x4_fragment_shader
Initial value:
= R"SHADER_SOURCE(
#version 120
varying vec2 texcoord;
uniform sampler2D source;
void main()
{
float step_x = dFdx(texcoord.x)/4.;
float step_y = dFdy(texcoord.y)/4.;
vec4 q00 = texture2D( source, texcoord + vec2(-step_x, -step_y) );
vec4 q01 = texture2D( source, texcoord + vec2( step_x, -step_y) );
vec4 q10 = texture2D( source, texcoord + vec2(-step_x, step_y) );
vec4 q11 = texture2D( source, texcoord + vec2( step_x, step_y) );
gl_FragColor = (q00+q01+q10+q11)/4;
}
)SHADER_SOURCE"

Definition at line 262 of file gl_builtin_shaders.cpp.

Referenced by KIGFX::ANTIALIASING_SUPERSAMPLING::Init().

const char KIGFX::BUILTIN_SHADERS::ssaa_x4_vertex_shader
Initial value:
= R"SHADER_SOURCE(
#version 120
varying vec2 texcoord;
void main()
{
texcoord = gl_MultiTexCoord0.st;
gl_Position = ftransform();
}
)SHADER_SOURCE"

Definition at line 250 of file gl_builtin_shaders.cpp.

Referenced by KIGFX::ANTIALIASING_SUPERSAMPLING::Init().