MythTV  master
Variables
mythrenderopenglshaders.h File Reference
#include <QString>
Include dependency graph for mythrenderopenglshaders.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Variables

static const QString kDefaultVertexShader
 
static const QString kDefaultFragmentShader
 
static const QString kDefaultFragmentShaderLimited
 
static const QString kSimpleVertexShader
 
static const QString kSimpleFragmentShader
 
static const QString kDrawVertexShader
 
static const QString kCircleFragmentShader
 
static const QString kCircleEdgeFragmentShader
 
static const QString kVertLineFragmentShader
 
static const QString kHorizLineFragmentShader
 

Variable Documentation

◆ kDefaultVertexShader

const QString kDefaultVertexShader
static
Initial value:
=
"attribute vec2 a_position;\n"
"attribute vec4 a_color;\n"
"attribute vec2 a_texcoord0;\n"
"varying vec4 v_color;\n"
"varying vec2 v_texcoord0;\n"
"uniform mat4 u_projection;\n"
"uniform mat4 u_transform;\n"
"void main() {\n"
" gl_Position = u_projection * u_transform * vec4(a_position, 0.0, 1.0);\n"
" v_texcoord0 = a_texcoord0;\n"
" v_color = a_color;\n"
"}\n"

Definition at line 6 of file mythrenderopenglshaders.h.

Referenced by MythRenderOpenGL::CreateDefaultShaders(), and MythRenderOpenGL::CreateShaderProgram().

◆ kDefaultFragmentShader

const QString kDefaultFragmentShader
static
Initial value:
=
"uniform sampler2D s_texture0;\n"
"varying highp vec4 v_color;\n"
"varying highp vec2 v_texcoord0;\n"
"void main(void)\n"
"{\n"
" gl_FragColor = texture2D(s_texture0, v_texcoord0) * v_color;\n"
"}\n"

Definition at line 20 of file mythrenderopenglshaders.h.

Referenced by MythRenderOpenGL::CreateDefaultShaders(), and MythRenderOpenGL::CreateShaderProgram().

◆ kDefaultFragmentShaderLimited

const QString kDefaultFragmentShaderLimited
static
Initial value:
=
"uniform sampler2D s_texture0;\n"
"varying highp vec4 v_color;\n"
"varying highp vec2 v_texcoord0;\n"
"void main(void)\n"
"{\n"
" gl_FragColor = (texture2D(s_texture0, v_texcoord0) * v_color * vec4(0.85882, 0.85882, 0.85882, 1.0)) + vec4(0.06274, 0.06274, 0.06274, 0.0);\n"
"}\n"

Definition at line 29 of file mythrenderopenglshaders.h.

Referenced by MythRenderOpenGL::CreateDefaultShaders().

◆ kSimpleVertexShader

const QString kSimpleVertexShader
static
Initial value:
=
"attribute vec2 a_position;\n"
"attribute vec4 a_color;\n"
"varying vec4 v_color;\n"
"uniform mat4 u_projection;\n"
"uniform mat4 u_transform;\n"
"void main() {\n"
" gl_Position = u_projection * u_transform * vec4(a_position, 0.0, 1.0);\n"
" v_color = a_color;\n"
"}\n"

Definition at line 38 of file mythrenderopenglshaders.h.

Referenced by MythRenderOpenGL::CreateDefaultShaders(), and VideoVisualMonoScope::Initialise().

◆ kSimpleFragmentShader

const QString kSimpleFragmentShader
static
Initial value:
=
"varying highp vec4 v_color;\n"
"void main(void)\n"
"{\n"
" gl_FragColor = v_color;\n"
"}\n"

Definition at line 49 of file mythrenderopenglshaders.h.

Referenced by MythRenderOpenGL::CreateDefaultShaders(), and VideoVisualMonoScope::Initialise().

◆ kDrawVertexShader

const QString kDrawVertexShader
static
Initial value:
=
"attribute vec2 a_position;\n"
"attribute vec4 a_color;\n"
"varying vec4 v_color;\n"
"varying vec2 v_position;\n"
"uniform mat4 u_projection;\n"
"uniform mat4 u_transform;\n"
"void main() {\n"
" gl_Position = u_projection * u_transform * vec4(a_position, 0.0, 1.0);\n"
" v_color = a_color;\n"
" v_position = a_position;\n"
"}\n"

Definition at line 56 of file mythrenderopenglshaders.h.

Referenced by MythRenderOpenGL::CreateDefaultShaders().

◆ kCircleFragmentShader

const QString kCircleFragmentShader
static
Initial value:
=
"varying highp vec4 v_color;\n"
"varying highp vec2 v_position;\n"
"uniform highp mat4 u_parameters;\n"
"void main(void)\n"
"{\n"
" highp float dis = distance(v_position.xy, u_parameters[0].xy);\n"
" highp float mult = smoothstep(u_parameters[0].z, u_parameters[0].w, dis);\n"
" gl_FragColor = v_color * vec4(1.0, 1.0, 1.0, mult);\n"
"}\n"

Definition at line 69 of file mythrenderopenglshaders.h.

Referenced by MythRenderOpenGL::CreateDefaultShaders().

◆ kCircleEdgeFragmentShader

const QString kCircleEdgeFragmentShader
static
Initial value:
=
"varying highp vec4 v_color;\n"
"varying highp vec2 v_position;\n"
"uniform highp mat4 u_parameters;\n"
"void main(void)\n"
"{\n"
" highp float dis = distance(v_position.xy, u_parameters[0].xy);\n"
" highp float rad = u_parameters[0].z;\n"
" highp float wid = u_parameters[0].w;\n"
" highp float mult = smoothstep(rad + wid, rad + (wid - 1.0), dis) * smoothstep(rad - (wid + 1.0), rad - wid, dis);\n"
" gl_FragColor = v_color * vec4(1.0, 1.0, 1.0, mult);\n"
"}\n"

Definition at line 80 of file mythrenderopenglshaders.h.

Referenced by MythRenderOpenGL::CreateDefaultShaders().

◆ kVertLineFragmentShader

const QString kVertLineFragmentShader
static
Initial value:
=
"varying highp vec4 v_color;\n"
"varying highp vec2 v_position;\n"
"uniform highp mat4 u_parameters;\n"
"void main(void)\n"
"{\n"
" highp float dis = abs(u_parameters[0].x - v_position.x);\n"
" highp float y = u_parameters[0].y * 2.0;\n"
" highp float mult = smoothstep(y, y - 0.1, dis) * smoothstep(-0.1, 0.0, dis);\n"
" gl_FragColor = v_color * vec4(1.0, 1.0, 1.0, mult);\n"
"}\n"

Definition at line 93 of file mythrenderopenglshaders.h.

Referenced by MythRenderOpenGL::CreateDefaultShaders().

◆ kHorizLineFragmentShader

const QString kHorizLineFragmentShader
static
Initial value:
=
"varying highp vec4 v_color;\n"
"varying highp vec2 v_position;\n"
"uniform highp mat4 u_parameters;\n"
"void main(void)\n"
"{\n"
" highp float dis = abs(u_parameters[0].x - v_position.y);\n"
" highp float x = u_parameters[0].y * 2.0;\n"
" highp float mult = smoothstep(x, x - 0.1, dis) * smoothstep(-0.1, 0.0, dis);\n"
" gl_FragColor = v_color * vec4(1.0, 1.0, 1.0, mult);\n"
"}\n"

Definition at line 105 of file mythrenderopenglshaders.h.

Referenced by MythRenderOpenGL::CreateDefaultShaders().