Project
Loading...
Searching...
No Matches
o2::gpu::GPUDisplayShaders Struct Reference

#include <GPUDisplayShaders.h>

Static Public Attributes

static constexpr const charvertexShader
 
static constexpr const charfragmentShader
 
static constexpr const charvertexShaderTexture
 
static constexpr const charfragmentShaderTexture
 
static constexpr const charfragmentShaderText
 
static constexpr const charvertexShaderPassthrough
 
static constexpr const chargeometryShaderP1
 
static constexpr const charfieldModelShaderConstants
 
static constexpr const charfieldModelShaderCode
 
static constexpr const chargeometryShaderP2
 

Detailed Description

Definition at line 22 of file GPUDisplayShaders.h.

Member Data Documentation

◆ fieldModelShaderCode

constexpr const char* o2::gpu::GPUDisplayShaders::fieldModelShaderCode
staticconstexpr

Definition at line 124 of file GPUDisplayShaders.h.

◆ fieldModelShaderConstants

constexpr const char* o2::gpu::GPUDisplayShaders::fieldModelShaderConstants
staticconstexpr
Initial value:
= R"(
#define DIMENSIONS {dimensions}
#define SOL_Z_SEGS {solZSegs}
#define SOL_P_SEGS {solPSegs}
#define SOL_R_SEGS {solRSegs}
#define SOL_PARAMS {solParams}
#define SOL_ROWS {solRows}
#define SOL_COLUMNS {solColumns}
#define SOL_COEFFS {solCoeffs}
#define DIP_Z_SEGS {dipZSegs}
#define DIP_Y_SEGS {dipYSegs}
#define DIP_X_SEGS {dipXSegs}
#define DIP_PARAMS {dipParams}
#define DIP_ROWS {dipRows}
#define DIP_COLUMNS {dipColumns}
#define DIP_COEFFS {dipCoeffs}
#define MAX_CHEB_ORDER {maxChebOrder}
)"

Definition at line 100 of file GPUDisplayShaders.h.

◆ fragmentShader

constexpr const char* o2::gpu::GPUDisplayShaders::fragmentShader
staticconstexpr
Initial value:
= R"(
#version 450 core
out vec4 fragColor;
uniform vec4 color;
void main()
{
fragColor = vec4(color.x, color.y, color.z, 1.f);
}
)"

Definition at line 34 of file GPUDisplayShaders.h.

◆ fragmentShaderText

constexpr const char* o2::gpu::GPUDisplayShaders::fragmentShaderText
staticconstexpr
Initial value:
= R"(
#version 450 core
in vec2 TexCoords;
out vec4 color;
uniform sampler2D text;
uniform vec4 textColor;
void main()
{
vec4 sampled = vec4(1.0, 1.0, 1.0, texture(text, TexCoords).r);
color = textColor * sampled;
}
)"

Definition at line 73 of file GPUDisplayShaders.h.

◆ fragmentShaderTexture

constexpr const char* o2::gpu::GPUDisplayShaders::fragmentShaderTexture
staticconstexpr
Initial value:
= R"(
#version 450 core
in vec2 TexCoords;
out vec4 color;
uniform sampler2D tex;
uniform float alpha;
void main()
{
color = vec4(texture(tex, TexCoords).rgb, alpha);
}
)"

Definition at line 59 of file GPUDisplayShaders.h.

◆ geometryShaderP1

constexpr const char* o2::gpu::GPUDisplayShaders::geometryShaderP1
staticconstexpr
Initial value:
= R"(
)"

Definition at line 97 of file GPUDisplayShaders.h.

◆ geometryShaderP2

constexpr const char* o2::gpu::GPUDisplayShaders::geometryShaderP2
staticconstexpr
Initial value:
= R"(
layout (points) in;
layout (line_strip, max_vertices = 256) out;
layout (binding = 0) uniform uniformMatrix { mat4 ModelViewProj; } um;
const float positionScale = 100.0f;
void main() {
vec3 position = gl_in[0].gl_Position.xyz;
for(uint32_t i = 0; i < field_config.StepCount; i++) {
gl_Position = um.ModelViewProj * vec4(position/positionScale, 1.0f);
EmitVertex();
const vec3 b_vec = Field(position);
position -= b_vec * field_config.StepSize;
}
EndPrimitive();
}
)"

Definition at line 447 of file GPUDisplayShaders.h.

◆ vertexShader

constexpr const char* o2::gpu::GPUDisplayShaders::vertexShader
staticconstexpr
Initial value:
= R"(
#version 450 core
layout (location = 0) in vec3 pos;
uniform mat4 ModelViewProj;
void main()
{
gl_Position = ModelViewProj * vec4(pos.x, pos.y, pos.z, 1.0);
}
)"

Definition at line 23 of file GPUDisplayShaders.h.

◆ vertexShaderPassthrough

constexpr const char* o2::gpu::GPUDisplayShaders::vertexShaderPassthrough
staticconstexpr
Initial value:
= R"(
#version 450 core
layout (location = 0) in vec3 pos;
void main()
{
gl_Position = vec4(pos, 1.0);
}
)"

Definition at line 88 of file GPUDisplayShaders.h.

◆ vertexShaderTexture

constexpr const char* o2::gpu::GPUDisplayShaders::vertexShaderTexture
staticconstexpr
Initial value:
= R"(
#version 450 core
layout (location = 0) in vec4 vertex;
out vec2 TexCoords;
uniform mat4 projection;
void main()
{
gl_Position = projection * vec4(vertex.xy, 0.0, 1.0);
TexCoords = vertex.zw;
}
)"

Definition at line 45 of file GPUDisplayShaders.h.


The documentation for this struct was generated from the following file: