SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLGLProgramGenerated.cpp File Reference
#include <SLAssetManager.h>
#include <SLGLProgramManager.h>
#include <SLGLProgramGenerated.h>
#include <SLGLShader.h>
#include <SLCamera.h>
#include <SLLight.h>
#include <SLGLDepthBuffer.h>
Include dependency graph for SLGLProgramGenerated.cpp:

Go to the source code of this file.

Variables

const string vertInput_a_pn
 
const string vertInput_PS_a_p
 
const string vertInput_PS_a_v
 
const string vertInput_PS_a_st
 
const string vertInput_PS_a_initV
 
const string vertInput_PS_a_r
 
const string vertInput_PS_a_r_angularVelo
 
const string vertInput_PS_a_texNum
 
const string vertInput_PS_a_initP
 
const string vertInput_PS_a_InstPos
 
const string vertInput_a_uv0
 
const string vertInput_a_uv1
 
const string vertInput_a_tangent
 
const string vertInput_a_skinning
 
const string vertInput_u_matrices_all
 
const string vertInput_u_matrix_vOmv
 
const string vertInput_u_skinning
 
const string vertInput_u_lightNm
 
const string vertConstant_PS_pi
 
const string vertInput_PS_u_time
 
const string fragInput_PS_u_tTL
 
const string vertInput_PS_u_al_bernstein_alpha
 
const string vertInput_PS_u_al_bernstein_size
 
const string vertInput_PS_u_colorOvLF
 
const string fragInput_PS_u_colorOvLF
 
const string vertInput_PS_u_deltaTime
 
const string vertInput_PS_u_pgPos
 
const string vertInput_PS_u_a_const
 
const string vertInput_PS_u_a_diffDir
 
const string vertInput_PS_u_g
 
const string vertInput_PS_u_angularVelo
 
const string vertInput_PS_u_col
 
const string vertInput_PS_u_row
 
const string vertInput_PS_u_condFB
 
const string vertOutput_v_P_VS
 
const string vertOutput_v_P_WS
 
const string vertOutput_v_N_VS
 
const string vertOutput_v_R_OS
 
const string vertOutput_v_uv0
 
const string vertOutput_v_uv1
 
const string vertOutput_v_lightVecTS
 
const string vertFunction_PS_ColorOverLT
 
const string fragFunction_PS_ColorOverLT
 
const string vertOutput_PS_struct_Begin
 
const string vertOutput_PS_struct_t
 
const string vertOutput_PS_struct_r
 
const string vertOutput_PS_struct_s
 
const string vertOutput_PS_struct_c
 
const string vertOutput_PS_struct_texNum
 
const string vertOutput_PS_struct_End
 
const string vertOutput_PS_instanced_transparency
 
const string fragInput_PS_instanced_transparency
 
const string fragMain_PS_instanced_v_doColorOverLT
 
const string fragMain_PS_instanced_c
 
const string fragMain_PS_instanced_transparency
 
const string vertInput_u_matrix_p
 
const string vertInput_u_matrix_vertBillboard
 
const string fragInput_PS_u_c
 
const string vertInput_PS_u_ScaRa
 
const string vertOutput_PS_tf_p
 
const string vertOutput_PS_tf_v
 
const string vertOutput_PS_tf_st
 
const string vertOutput_PS_tf_initV
 
const string vertOutput_PS_tf_r
 
const string vertOutput_PS_tf_r_angularVelo
 
const string vertOutput_PS_tf_texNum
 
const string vertOutput_PS_tf_initP
 
const string main_Begin
 
const string vertMain_v_P_VS
 
const string vertMain_v_P_WS_Sm
 
const string vertMain_v_N_VS
 
const string vertMain_v_R_OS
 
const string vertMain_v_uv0
 
const string vertMain_v_uv1
 
const string vertMain_skinning
 
const string vertMain_skinning_Nm
 
const string vertMain_TBN_Nm
 
const string vertMain_PS_v_t_default
 
const string vertMain_PS_v_t_begin
 
const string vertMain_PS_v_t_linear
 
const string vertMain_PS_v_t_curve
 
const string vertMain_PS_v_t_end
 
const string vertMain_PS_v_r
 
const string vertMain_PS_v_s
 
const string vertMain_PS_v_s_curve
 
const string vertMain_PS_v_doColorOverLT
 
const string vertOutput_PS_age
 
const string fragInput_PS_age
 
const string vertMain_PS_v_texNum
 
const string vertMain_PS_v_a
 
const string vertMain_PS_v_tC
 
const string vertMain_PS_v_age
 
const string vertMain_PS_v_tC_flipbook
 
const string vertMain_PS_instanced_position
 
const string vertMain_PS_instanced_v_s
 
const string vertMain_PS_instanced_v_s_curve
 
const string vertMain_PS_instanced_v_sS
 
const string vertMain_PS_instanced_v_t_default
 
const string vertMain_PS_instanced_v_t_begin
 
const string vertMain_PS_instanced_v_t_linear
 
const string vertMain_PS_instanced_v_t_curve
 
const string vertMain_PS_instanced_scale
 
const string vertMain_PS_instanced_rotate
 
const string vertMain_PS_instanced_EndAll
 
const string vertMain_PS_instanced_EndAll_VertBillboard
 
const string vertMain_PS_EndAll
 
const string vertMain_PS_EndAll_VertBillboard
 
const string vertMain_EndAll
 
const string vertMain_PS_U_Begin
 
const string vertMain_PS_U_v_init_p
 
const string vertMain_PS_U_v_init_v
 
const string vertMain_PS_U_v_init_st
 
const string vertMain_PS_U_v_init_initV
 
const string vertMain_PS_U_v_init_r
 
const string vertMain_PS_U_v_init_r_angularVelo
 
const string vertMain_PS_U_v_init_texNum
 
const string vertMain_PS_U_v_init_initP
 
const string vertMain_PS_U_bornDead
 
const string vertMain_PS_U_reset_p
 
const string vertMain_PS_U_reset_shape_p
 
const string vertMain_PS_U_reset_v
 
const string vertMain_PS_U_reset_st_counterGap
 
const string vertMain_PS_U_reset_st
 
const string vertMain_PS_U_alive_p
 
const string vertMain_PS_U_v_rConst
 
const string vertMain_PS_U_v_rRange
 
const string vertMain_PS_U_alive_a_const
 
const string vertMain_PS_U_alive_a_diffDir
 
const string vertMain_PS_U_alive_g
 
const string vertMain_PS_U_alive_texNum
 
const string vertMain_PS_U_EndAll
 
const string geomConfig_PS
 
const string geomInput_PS_struct_Begin
 
const string geomInput_PS_struct_t
 
const string geomInput_PS_struct_r
 
const string geomInput_PS_struct_s
 
const string geomInput_PS_struct_c
 
const string geomInput_PS_struct_texNum
 
const string geomInput_PS_struct_End
 
const string geomInput_u_matrix_p
 
const string geomInput_u_matrix_vertBillboard
 
const string geomInput_PS_u_ScaRa
 
const string geomInput_PS_u_c
 
const string geomInput_PS_u_col
 
const string geomInput_PS_u_row
 
const string geomOutput_PS_v_pC
 
const string geomOutput_PS_v_tC
 
const string vertOutput_PS_v_tC
 
const string geomMain_PS_v_s
 
const string geomMain_PS_v_sS
 
const string geomMain_PS_v_rad
 
const string geomMain_PS_v_p
 
const string geomMain_PS_v_rot
 
const string geomMain_PS_v_rotIden
 
const string geomMain_PS_v_c
 
const string geomMain_PS_v_doColorOverLT
 
const string geomMain_PS_v_withoutColor
 
const string geomMain_PS_v_cT
 
const string geomMain_PS_fourCorners
 
const string geomMain_PS_fourCorners_vertBillboard
 
const string geomMain_PS_fourCorners_horizBillboard
 
const string geomMain_PS_Flipbook_fourCorners
 
const string geomMain_PS_Flipbook_fourCorners_horizBillboard
 
const string geomMain_PS_Flipbook_fourCorners_vertBillboard
 
const string geomMain_PS_EndAll
 
const string fragInput_v_P_VS
 
const string fragInput_v_P_WS
 
const string fragInput_v_N_VS
 
const string fragInput_v_R_OS
 
const string fragInput_v_uv0
 
const string fragInput_v_uv1
 
const string fragInput_v_lightVecTS
 
const string fragInput_PS_v_pC
 
const string fragInput_PS_v_tC
 
const string fragInput_PS_u_overG
 
const string fragInput_PS_u_wireFrame
 
const string fragMain_PS_TF
 
const string fragMain_PS
 
const string fragMain_PS_withoutColor
 
const string fragMain_PS_instanced_withoutColor
 
const string fragMain_instanced_PS_end
 
const string fragMain_PS_endAll
 
const string fragInput_u_lightAll
 
const string fragInput_u_matBlinnAll
 
const string fragInput_u_matAmbi
 
const string fragInput_u_matDiff
 
const string fragInput_u_matEmis
 
const string fragInput_u_matRough
 
const string fragInput_u_matMetal
 
const string fragInput_u_matTexDm
 
const string fragInput_u_matTexNm
 
const string fragInput_u_matTexEm
 
const string fragInput_u_matTexOm
 
const string fragInput_u_matTexRm
 
const string fragInput_u_matTexMm
 
const string fragInput_u_matTexRmMm
 
const string fragInput_u_matTexOmRmMm
 
const string fragInput_u_matGetsSm
 
const string fragInput_u_skyCookEnvMaps
 
const string fragInput_u_cam
 
const string fragOutputs_o_fragColor
 
const string fragFunctionsLightingBlinnPhong
 
const string fragFunctionsLightingCookTorrance
 
const string fragFunctionDoStereoSeparation
 
const string fragFunctionFogBlend
 
const string fragFunctionDoColoredShadows
 
const string fragMain_0_Intensities
 
const string fragMain_1_EN_in_VS
 
const string fragMain_1_EN_in_TS
 
const string fragMain_1_matEmis
 
const string fragMain_1_matEmis_Em
 
const string fragMain_1_matOccl
 
const string fragMain_1_matOccl_Om0
 
const string fragMain_1_matOccl_Om1
 
const string fragMainBlinn_2_LightLoop
 
const string fragMainBlinn_2_LightLoopNm
 
const string fragMainBlinn_2_LightLoopSm
 
const string fragMainBlinn_2_LightLoopNmSm
 
const string fragMainBlinn_3_FragColor
 
const string fragMainBlinn_3_FragColorDm
 
const string fragMain_4_ColoredShadows
 
const string fragMain_5_FogGammaStereo
 
const string fragMainCook_1_matDiff
 
const string fragMainCook_1_matDiff_Dm
 
const string fragMainCook_1_matEmis
 
const string fragMainCook_1_matEmis_Em
 
const string fragMainCook_1_matRough
 
const string fragMainCook_1_matRough_Rm
 
const string fragMainCook_1_matRough_RMm
 
const string fragMainCook_1_matRough_ORMm
 
const string fragMainCook_1_matMetal
 
const string fragMainCook_1_matMetal_Mm
 
const string fragMainCook_1_matMetal_RMm
 
const string fragMainCook_1_matMetal_ORMm
 
const string fragMainCook_1_matOcclu_1
 
const string fragMainCook_1_matOcclu_Om0
 
const string fragMainCook_1_matOcclu_Om1
 
const string fragMainCook_1_matOcclu_ORMm
 
const string fragMainCook_2_LightLoop
 
const string fragMainCook_2_LightLoopNm
 
const string fragMainCook_2_LightLoopSm
 
const string fragMainCook_2_LightLoopNmSm
 
const string fragMainCook_3_FragColor
 
const string fragMainCook_3_FragColorSky
 
const string fragMainVideoBkgd
 

Detailed Description

Date
December 2020
Authors
Marcus Hudritsch
Remarks
Please use clangformat to format the code. See more code style on https://github.com/cpvrlab/SLProject4/wiki/SLProject-Coding-Style

Definition in file SLGLProgramGenerated.cpp.

Variable Documentation

◆ fragFunction_PS_ColorOverLT

const string fragFunction_PS_ColorOverLT
Initial value:
= R"(
vec3 colorByAge(float age)
{
int cachePos = int(clamp(age, 0.0, 1.0) * 255.0) * 3;
vec3 color = vec3(u_colorArr[cachePos], u_colorArr[cachePos + 1], u_colorArr[cachePos + 2]);
return color;
})"

Definition at line 144 of file SLGLProgramGenerated.cpp.

◆ fragFunctionDoColoredShadows

const string fragFunctionDoColoredShadows

Definition at line 1213 of file SLGLProgramGenerated.cpp.

◆ fragFunctionDoStereoSeparation

const string fragFunctionDoStereoSeparation

Definition at line 1138 of file SLGLProgramGenerated.cpp.

◆ fragFunctionFogBlend

const string fragFunctionFogBlend
Initial value:
= R"(
//-----------------------------------------------------------------------------
vec4 fogBlend(vec3 P_VS, vec4 inColor)
{
float factor = 0.0f;
float distance = length(P_VS);
switch (u_camFogMode)
{
case 0:
factor = (u_camFogEnd - distance) / (u_camFogEnd - u_camFogStart);
break;
case 1:
factor = exp(-u_camFogDensity * distance);
break;
default:
factor = exp(-u_camFogDensity * distance * u_camFogDensity * distance);
break;
}
vec4 outColor = factor * inColor + (1.0 - factor) * u_camFogColor;
outColor = clamp(outColor, 0.0, 1.0);
return outColor;
})"

Definition at line 1188 of file SLGLProgramGenerated.cpp.

◆ fragFunctionsLightingBlinnPhong

const string fragFunctionsLightingBlinnPhong

Definition at line 930 of file SLGLProgramGenerated.cpp.

◆ fragFunctionsLightingCookTorrance

const string fragFunctionsLightingCookTorrance

Definition at line 1006 of file SLGLProgramGenerated.cpp.

◆ fragInput_PS_age

const string fragInput_PS_age
Initial value:
= R"(
in float v_age; // Age of a particle)"

Definition at line 346 of file SLGLProgramGenerated.cpp.

◆ fragInput_PS_instanced_transparency

const string fragInput_PS_instanced_transparency
Initial value:
= R"(
in float transparency; // transparency of a particle )"

Definition at line 171 of file SLGLProgramGenerated.cpp.

◆ fragInput_PS_u_c

const string fragInput_PS_u_c
Initial value:
= R"(
uniform vec4 u_color; // Particle color)"

Definition at line 184 of file SLGLProgramGenerated.cpp.

◆ fragInput_PS_u_colorOvLF

const string fragInput_PS_u_colorOvLF
Initial value:
= R"(
uniform float u_colorArr[256 * 3]; // Array of color value (for color over life))"

Definition at line 97 of file SLGLProgramGenerated.cpp.

◆ fragInput_PS_u_overG

const string fragInput_PS_u_overG
Initial value:
= R"(
uniform float u_oneOverGamma; // 1.0f / Gamma correction value)"

Definition at line 786 of file SLGLProgramGenerated.cpp.

◆ fragInput_PS_u_tTL

const string fragInput_PS_u_tTL
Initial value:
= R"(
uniform float u_tTL; // Time to live of a particle)"

Definition at line 89 of file SLGLProgramGenerated.cpp.

◆ fragInput_PS_u_wireFrame

const string fragInput_PS_u_wireFrame
Initial value:
= R"(
uniform bool u_doWireFrame; // Boolean for wireFrame)"

Definition at line 788 of file SLGLProgramGenerated.cpp.

◆ fragInput_PS_v_pC

const string fragInput_PS_v_pC
Initial value:
= R"(
in vec4 v_particleColor; // interpolated color from the geometry shader)"

Definition at line 781 of file SLGLProgramGenerated.cpp.

◆ fragInput_PS_v_tC

const string fragInput_PS_v_tC
Initial value:
= R"(
in vec2 v_texCoord; // interpolated texture coordinate)"

Definition at line 783 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_cam

const string fragInput_u_cam
Initial value:
= R"(
uniform int u_camProjType; // type of stereo
uniform int u_camStereoEye; // -1=left, 0=center, 1=right
uniform mat3 u_camStereoColors; // color filter matrix
uniform bool u_camFogIsOn; // flag if fog is on
uniform int u_camFogMode; // 0=LINEAR, 1=EXP, 2=EXP2
uniform float u_camFogDensity; // fog density value
uniform float u_camFogStart; // fog start distance
uniform float u_camFogEnd; // fog end distance
uniform vec4 u_camFogColor; // fog color (usually the background)
uniform float u_camClipNear; // camera near plane
uniform float u_camClipFar; // camera far plane
uniform float u_camBkgdWidth; // camera background width
uniform float u_camBkgdHeight; // camera background height
uniform float u_camBkgdLeft; // camera background left
uniform float u_camBkgdBottom; // camera background bottom)"

Definition at line 908 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_lightAll

const string fragInput_u_lightAll
Initial value:
= R"(
uniform bool u_lightIsOn[NUM_LIGHTS]; // flag if light is on
uniform vec4 u_lightPosVS[NUM_LIGHTS]; // position of light in view space
uniform vec4 u_lightAmbi[NUM_LIGHTS]; // ambient light intensity (Ia)
uniform vec4 u_lightDiff[NUM_LIGHTS]; // diffuse light intensity (Id)
uniform vec4 u_lightSpec[NUM_LIGHTS]; // specular light intensity (Is)
uniform vec3 u_lightSpotDir[NUM_LIGHTS]; // spot direction in view space
uniform float u_lightSpotDeg[NUM_LIGHTS]; // spot cutoff angle 1-180 degrees
uniform float u_lightSpotCos[NUM_LIGHTS]; // cosine of spot cutoff angle
uniform float u_lightSpotExp[NUM_LIGHTS]; // spot exponent
uniform vec3 u_lightAtt[NUM_LIGHTS]; // attenuation (const,linear,quadr.)
uniform bool u_lightDoAtt[NUM_LIGHTS]; // flag if att. must be calc.
uniform vec4 u_globalAmbi; // Global ambient scene color
uniform float u_oneOverGamma; // 1.0f / Gamma correction value
)"

Definition at line 849 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_matAmbi

const string fragInput_u_matAmbi
Initial value:
= R"(
uniform vec4 u_matAmbi; // ambient color reflection coefficient (ka))"

Definition at line 872 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_matBlinnAll

const string fragInput_u_matBlinnAll
Initial value:
= R"(
uniform vec4 u_matAmbi; // ambient color reflection coefficient (ka)
uniform vec4 u_matDiff; // diffuse color reflection coefficient (kd)
uniform vec4 u_matSpec; // specular color reflection coefficient (ks)
uniform vec4 u_matEmis; // emissive color for self-shining materials
uniform float u_matShin; // shininess exponent
)"

Definition at line 865 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_matDiff

const string fragInput_u_matDiff
Initial value:
= R"(
uniform vec4 u_matDiff; // diffuse color reflection coefficient (kd))"

Definition at line 874 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_matEmis

const string fragInput_u_matEmis
Initial value:
= R"(
uniform vec4 u_matEmis; // emissive color (ke))"

Definition at line 876 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_matGetsSm

const string fragInput_u_matGetsSm
Initial value:
= R"(
uniform bool u_matGetsShadows; // flag if material receives shadows)"

Definition at line 899 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_matMetal

const string fragInput_u_matMetal
Initial value:
= R"(
uniform float u_matMetal; // metalness factor (0-1)"

Definition at line 880 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_matRough

const string fragInput_u_matRough
Initial value:
= R"(
uniform float u_matRough; // roughness factor (0-1))"

Definition at line 878 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_matTexDm

const string fragInput_u_matTexDm
Initial value:
= R"(
uniform sampler2D u_matTextureDiffuse0; // Diffuse color map)"

Definition at line 883 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_matTexEm

const string fragInput_u_matTexEm
Initial value:
= R"(
uniform sampler2D u_matTextureEmissive0; // PBR material emissive texture)"

Definition at line 887 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_matTexMm

const string fragInput_u_matTexMm
Initial value:
= R"(
uniform sampler2D u_matTextureMetallic0; // PBR material metallic texture)"

Definition at line 893 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_matTexNm

const string fragInput_u_matTexNm
Initial value:
= R"(
uniform sampler2D u_matTextureNormal0; // Normal bump map)"

Definition at line 885 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_matTexOm

const string fragInput_u_matTexOm
Initial value:
= R"(
uniform sampler2D u_matTextureOcclusion0; // Ambient occlusion map)"

Definition at line 889 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_matTexOmRmMm

const string fragInput_u_matTexOmRmMm
Initial value:
= R"(
uniform sampler2D u_matTextureOccluRoughMetal0; // PBR material occlusion-roughness-metalic texture)"

Definition at line 897 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_matTexRm

const string fragInput_u_matTexRm
Initial value:
= R"(
uniform sampler2D u_matTextureRoughness0; // PBR material roughness texture)"

Definition at line 891 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_matTexRmMm

const string fragInput_u_matTexRmMm
Initial value:
= R"(
uniform sampler2D u_matTextureRoughMetal0; // PBR material roughness-metallic texture)"

Definition at line 895 of file SLGLProgramGenerated.cpp.

◆ fragInput_u_skyCookEnvMaps

const string fragInput_u_skyCookEnvMaps
Initial value:
= R"(
uniform samplerCube u_skyIrradianceCubemap; // PBR skybox irradiance light
uniform samplerCube u_skyRoughnessCubemap; // PBR skybox cubemap for rough reflections
uniform sampler2D u_skyBrdfLutTexture; // PBR lighting lookup table for BRDF
uniform float u_skyExposure; // PBR skybox exposure)"

Definition at line 902 of file SLGLProgramGenerated.cpp.

◆ fragInput_v_lightVecTS

const string fragInput_v_lightVecTS
Initial value:
= R"(
in vec3 v_eyeDirTS; // Vector to the eye in tangent space
in vec3 v_lightDirTS[NUM_LIGHTS]; // Vector to light 0 in tangent space
in vec3 v_spotDirTS[NUM_LIGHTS]; // Spot direction in tangent space)"

Definition at line 776 of file SLGLProgramGenerated.cpp.

◆ fragInput_v_N_VS

const string fragInput_v_N_VS
Initial value:
= R"(
in vec3 v_N_VS; // Interpol. normal at v_P_VS in view space)"

Definition at line 768 of file SLGLProgramGenerated.cpp.

◆ fragInput_v_P_VS

const string fragInput_v_P_VS
Initial value:
= R"(
in vec3 v_P_VS; // Interpol. point of illumination in view space (VS))"

Definition at line 764 of file SLGLProgramGenerated.cpp.

◆ fragInput_v_P_WS

const string fragInput_v_P_WS
Initial value:
= R"(
in vec3 v_P_WS; // Interpol. point of illumination in world space (WS))"

Definition at line 766 of file SLGLProgramGenerated.cpp.

◆ fragInput_v_R_OS

const string fragInput_v_R_OS
Initial value:
= R"(
in vec3 v_R_OS; // Interpol. reflect in object space)"

Definition at line 770 of file SLGLProgramGenerated.cpp.

◆ fragInput_v_uv0

const string fragInput_v_uv0
Initial value:
= R"(
in vec2 v_uv0; // Texture coordinate varying for uv 0)"

Definition at line 772 of file SLGLProgramGenerated.cpp.

◆ fragInput_v_uv1

const string fragInput_v_uv1
Initial value:
= R"(
in vec2 v_uv1; // Texture coordinate varying for uv 1)"

Definition at line 774 of file SLGLProgramGenerated.cpp.

◆ fragMain_0_Intensities

const string fragMain_0_Intensities
Initial value:
= R"(
vec4 Ia = vec4(0.0); // Accumulated ambient light intensity at v_P_VS
vec4 Id = vec4(0.0); // Accumulated diffuse light intensity at v_P_VS
vec4 Is = vec4(0.0); // Accumulated specular light intensity at v_P_VS
)"

Definition at line 1254 of file SLGLProgramGenerated.cpp.

◆ fragMain_1_EN_in_TS

const string fragMain_1_EN_in_TS
Initial value:
= R"(
vec3 E = normalize(v_eyeDirTS); // normalized interpolated eye direction
// Get normal from normal map, move from [0,1] to [-1, 1] range & normalize
vec3 N = normalize(texture(u_matTextureNormal0, v_uv0).rgb * 2.0 - 1.0);
)"

Definition at line 1264 of file SLGLProgramGenerated.cpp.

◆ fragMain_1_EN_in_VS

const string fragMain_1_EN_in_VS
Initial value:
= R"(
vec3 E = normalize(-v_P_VS); // Interpolated vector from p to the eye
vec3 N = normalize(v_N_VS); // A input normal has not anymore unit length
)"

Definition at line 1260 of file SLGLProgramGenerated.cpp.

◆ fragMain_1_matEmis

const string fragMain_1_matEmis
Initial value:
= R"(
vec4 matEmis = u_matEmis;)"

Definition at line 1270 of file SLGLProgramGenerated.cpp.

◆ fragMain_1_matEmis_Em

const string fragMain_1_matEmis_Em
Initial value:
= R"(
vec4 matEmis = texture(u_matTextureEmissive0, v_uv0);)"

Definition at line 1272 of file SLGLProgramGenerated.cpp.

◆ fragMain_1_matOccl

const string fragMain_1_matOccl
Initial value:
= R"(
float matOccl = 1.0;)"

Definition at line 1274 of file SLGLProgramGenerated.cpp.

◆ fragMain_1_matOccl_Om0

const string fragMain_1_matOccl_Om0
Initial value:
= R"(
float matOccl = texture(u_matTextureOcclusion0, v_uv0).r;)"

Definition at line 1276 of file SLGLProgramGenerated.cpp.

◆ fragMain_1_matOccl_Om1

const string fragMain_1_matOccl_Om1
Initial value:
= R"(
float matOccl = texture(u_matTextureOcclusion0, v_uv1).r;)"

Definition at line 1278 of file SLGLProgramGenerated.cpp.

◆ fragMain_4_ColoredShadows

const string fragMain_4_ColoredShadows
Initial value:
= R"(
// Colorize cascaded shadows for debugging purpose
if (u_lightsDoColoredShadows)
doColoredShadows(N);
)"

Definition at line 1407 of file SLGLProgramGenerated.cpp.

◆ fragMain_5_FogGammaStereo

const string fragMain_5_FogGammaStereo
Initial value:
= R"(
// Apply fog by blending over distance
if (u_camFogIsOn)
o_fragColor = fogBlend(v_P_VS, o_fragColor);
// Apply gamma correction
o_fragColor.rgb = pow(o_fragColor.rgb, vec3(u_oneOverGamma));
// Apply stereo eye separation
if (u_camProjType > 1)
doStereoSeparation();
}
)"

Definition at line 1413 of file SLGLProgramGenerated.cpp.

◆ fragMain_instanced_PS_end

const string fragMain_instanced_PS_end
Initial value:
= R"(
// Just set the interpolated color from the vertex shader
o_fragColor = color;
// componentwise multiply w. texture color
if(!u_doWireFrame)
o_fragColor *= texture(u_matTextureDiffuse0, v_texCoord);
if(o_fragColor.a < 0.001)
discard;
)"

Definition at line 831 of file SLGLProgramGenerated.cpp.

◆ fragMain_PS

const string fragMain_PS
Initial value:
= R"(
// Just set the interpolated color from the vertex shader
o_fragColor = v_particleColor;
// componentwise multiply w. texture color
if(!u_doWireFrame)
o_fragColor *= texture(u_matTextureDiffuse0, v_texCoord);
if(o_fragColor.a < 0.001)
discard;
)"

Definition at line 796 of file SLGLProgramGenerated.cpp.

◆ fragMain_PS_endAll

const string fragMain_PS_endAll
Initial value:
= R"(
//Same color for each wireframe
if(u_doWireFrame)
o_fragColor = vec4(0,0,0,1.0);
o_fragColor.rgb = pow(o_fragColor.rgb, vec3(u_oneOverGamma));
})"

Definition at line 841 of file SLGLProgramGenerated.cpp.

◆ fragMain_PS_instanced_c

const string fragMain_PS_instanced_c
Initial value:
= R"(
vec4 color = u_color; // Particle color)"

Definition at line 176 of file SLGLProgramGenerated.cpp.

◆ fragMain_PS_instanced_transparency

const string fragMain_PS_instanced_transparency
Initial value:
= R"(
color.w *= transparency; // Apply transparency)"

Definition at line 178 of file SLGLProgramGenerated.cpp.

◆ fragMain_PS_instanced_v_doColorOverLT

const string fragMain_PS_instanced_v_doColorOverLT
Initial value:
= R"(
vec4 color = vec4(colorByAge(v_age/u_tTL), 1.0); // Particle color)"

Definition at line 174 of file SLGLProgramGenerated.cpp.

◆ fragMain_PS_instanced_withoutColor

const string fragMain_PS_instanced_withoutColor
Initial value:
= R"(
// componentwise multiply w. texture color
if(!u_doWireFrame)
o_fragColor = texture(u_matTextureDiffuse0, v_texCoord);
else
o_fragColor = vec4(0,0,0,1.0);
o_fragColor.a *= transparency;
if(o_fragColor.a < 0.001)
discard;
)"

Definition at line 819 of file SLGLProgramGenerated.cpp.

◆ fragMain_PS_TF

const string fragMain_PS_TF
Initial value:
= R"(
o_fragColor = vec4(0,0,0,0); // Need to be here for the compilation
}
)"

Definition at line 791 of file SLGLProgramGenerated.cpp.

◆ fragMain_PS_withoutColor

const string fragMain_PS_withoutColor
Initial value:
= R"(
// componentwise multiply w. texture color
if(!u_doWireFrame)
o_fragColor = texture(u_matTextureDiffuse0, v_texCoord);
else
o_fragColor = vec4(0,0,0,1.0);
o_fragColor.a *= v_particleColor.a;
if(o_fragColor.a < 0.001)
discard;
)"

Definition at line 807 of file SLGLProgramGenerated.cpp.

◆ fragMainBlinn_2_LightLoop

const string fragMainBlinn_2_LightLoop
Initial value:
= R"(
// Get the reflection from all lights into Ia, Id & Is
for (int i = 0; i < NUM_LIGHTS; ++i)
{
if (u_lightIsOn[i])
{
if (u_lightPosVS[i].w == 0.0)
{
// We use the spot light direction as the light direction vector
vec3 S = normalize(-u_lightSpotDir[i].xyz);
directLightBlinnPhong(i, N, E, S, 0.0, Ia, Id, Is);
}
else
{
vec3 S = u_lightSpotDir[i]; // normalized spot direction in VS
vec3 L = u_lightPosVS[i].xyz - v_P_VS; // Vector from v_P to light in VS
pointLightBlinnPhong(i, N, E, S, L, 0.0, Ia, Id, Is);
}
}
}
)"

Definition at line 1281 of file SLGLProgramGenerated.cpp.

◆ fragMainBlinn_2_LightLoopNm

const string fragMainBlinn_2_LightLoopNm
Initial value:
= R"(
// Get the reflection from all lights into Ia, Id & Is
for (int i = 0; i < NUM_LIGHTS; ++i)
{
if (u_lightIsOn[i])
{
if (u_lightPosVS[i].w == 0.0)
{
// We use the spot light direction as the light direction vector
vec3 S = normalize(-v_spotDirTS[i]);
directLightBlinnPhong(i, N, E, S, 0.0, Ia, Id, Is);
}
else
{
vec3 S = normalize(v_spotDirTS[i]); // normalized spot direction in TS
vec3 L = v_lightDirTS[i]; // Vector from v_P to light in TS
pointLightBlinnPhong(i, N, E, S, L, 0.0, Ia, Id, Is);
}
}
}
)"

Definition at line 1303 of file SLGLProgramGenerated.cpp.

◆ fragMainBlinn_2_LightLoopNmSm

const string fragMainBlinn_2_LightLoopNmSm
Initial value:
= R"(
// Get the reflection from all lights into Ia, Id & Is
for (int i = 0; i < NUM_LIGHTS; ++i)
{
if (u_lightIsOn[i])
{
if (u_lightPosVS[i].w == 0.0)
{
// We use the spot light direction as the light direction vector
vec3 S = normalize(-v_spotDirTS[i]);
// Test if the current fragment is in shadow
float shadow = u_matGetsShadows ? shadowTest(i, N, S) : 0.0;
directLightBlinnPhong(i, N, E, S, shadow, Ia, Id, Is);
}
else
{
vec3 S = normalize(v_spotDirTS[i]); // normalized spot direction in TS
vec3 L = v_lightDirTS[i]; // Vector from v_P to light in TS
// Test if the current fragment is in shadow
float shadow = u_matGetsShadows ? shadowTest(i, N, L) : 0.0;
pointLightBlinnPhong(i, N, E, S, L, shadow, Ia, Id, Is);
}
}
}
)"

Definition at line 1353 of file SLGLProgramGenerated.cpp.

◆ fragMainBlinn_2_LightLoopSm

const string fragMainBlinn_2_LightLoopSm
Initial value:
= R"(
// Get the reflection from all lights into Ia, Id & Is
for (int i = 0; i < NUM_LIGHTS; ++i)
{
if (u_lightIsOn[i])
{
if (u_lightPosVS[i].w == 0.0)
{
// We use the spot light direction as the light direction vector
vec3 S = normalize(-u_lightSpotDir[i].xyz);
// Test if the current fragment is in shadow
float shadow = u_matGetsShadows ? shadowTest(i, N, S) : 0.0;
directLightBlinnPhong(i, N, E, S, shadow, Ia, Id, Is);
}
else
{
vec3 S = u_lightSpotDir[i]; // normalized spot direction in VS
vec3 L = u_lightPosVS[i].xyz - v_P_VS; // Vector from v_P to light in VS
// Test if the current fragment is in shadow
float shadow = u_matGetsShadows ? shadowTest(i, N, L) : 0.0;
pointLightBlinnPhong(i, N, E, S, L, shadow, Ia, Id, Is);
}
}
}
)"

Definition at line 1325 of file SLGLProgramGenerated.cpp.

◆ fragMainBlinn_3_FragColor

const string fragMainBlinn_3_FragColor
Initial value:
= R"(
// Sum up all the reflected color components
o_fragColor = u_matEmis +
u_globalAmbi +
Ia * u_matAmbi * matOccl +
Id * u_matDiff +
Is * u_matSpec;
// For correct alpha blending overwrite alpha component
o_fragColor.a = u_matDiff.a;
)"

Definition at line 1381 of file SLGLProgramGenerated.cpp.

◆ fragMainBlinn_3_FragColorDm

const string fragMainBlinn_3_FragColorDm
Initial value:
= R"(
// Sum up all the reflected color components
o_fragColor = u_matEmis +
u_globalAmbi +
Ia * u_matAmbi * matOccl +
Id * u_matDiff;
// Componentwise multiply w. texture color
o_fragColor *= texture(u_matTextureDiffuse0, v_uv0);
// add finally the specular RGB-part
vec4 specColor = Is * u_matSpec;
o_fragColor.rgb += specColor.rgb;
)"

Definition at line 1392 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_1_matDiff

const string fragMainCook_1_matDiff
Initial value:
= R"(
vec4 matDiff = u_matDiff;)"

Definition at line 1427 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_1_matDiff_Dm

const string fragMainCook_1_matDiff_Dm
Initial value:
= R"(
vec4 matDiff = pow(texture(u_matTextureDiffuse0, v_uv0), vec4(2.2));)"

Definition at line 1429 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_1_matEmis

const string fragMainCook_1_matEmis
Initial value:
= R"(
vec4 matEmis = u_matEmis;)"

Definition at line 1431 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_1_matEmis_Em

const string fragMainCook_1_matEmis_Em
Initial value:
= R"(
vec4 matEmis = pow(texture(u_matTextureEmissive0, v_uv0), vec4(2.2));)"

Definition at line 1433 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_1_matMetal

const string fragMainCook_1_matMetal
Initial value:
= R"(
float matMetal = u_matMetal;)"

Definition at line 1443 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_1_matMetal_Mm

const string fragMainCook_1_matMetal_Mm
Initial value:
= R"(
float matMetal = texture(u_matTextureMetallic0, v_uv0).r;)"

Definition at line 1445 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_1_matMetal_ORMm

const string fragMainCook_1_matMetal_ORMm
Initial value:
= R"(
float matMetal = texture(u_matTextureOccluRoughMetal0, v_uv0).b;)"

Definition at line 1449 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_1_matMetal_RMm

const string fragMainCook_1_matMetal_RMm
Initial value:
= R"(
float matMetal = texture(u_matTextureRoughMetal0, v_uv0).b;)"

Definition at line 1447 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_1_matOcclu_1

const string fragMainCook_1_matOcclu_1
Initial value:
= R"(
float matOccl = 1.0;)"

Definition at line 1451 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_1_matOcclu_Om0

const string fragMainCook_1_matOcclu_Om0
Initial value:
= R"(
float matOccl = texture(u_matTextureOcclusion0, v_uv0).r;)"

Definition at line 1453 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_1_matOcclu_Om1

const string fragMainCook_1_matOcclu_Om1
Initial value:
= R"(
float matOccl = texture(u_matTextureOcclusion0, v_uv1).r;)"

Definition at line 1455 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_1_matOcclu_ORMm

const string fragMainCook_1_matOcclu_ORMm
Initial value:
= R"(
float matOccl = texture(u_matTextureOccluRoughMetal0, v_uv0).r;)"

Definition at line 1457 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_1_matRough

const string fragMainCook_1_matRough
Initial value:
= R"(
float matRough = u_matRough;)"

Definition at line 1435 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_1_matRough_ORMm

const string fragMainCook_1_matRough_ORMm
Initial value:
= R"(
float matRough = texture(u_matTextureOccluRoughMetal0, v_uv0).g;)"

Definition at line 1441 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_1_matRough_Rm

const string fragMainCook_1_matRough_Rm
Initial value:
= R"(
float matRough = texture(u_matTextureRoughness0, v_uv0).r;)"

Definition at line 1437 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_1_matRough_RMm

const string fragMainCook_1_matRough_RMm
Initial value:
= R"(
float matRough = texture(u_matTextureRoughMetal0, v_uv0).g;)"

Definition at line 1439 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_2_LightLoop

const string fragMainCook_2_LightLoop

Definition at line 1459 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_2_LightLoopNm

const string fragMainCook_2_LightLoopNm

Definition at line 1495 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_2_LightLoopNmSm

const string fragMainCook_2_LightLoopNmSm

Definition at line 1573 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_2_LightLoopSm

const string fragMainCook_2_LightLoopSm

Definition at line 1531 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_3_FragColor

const string fragMainCook_3_FragColor
Initial value:
= R"(
// ambient lighting (note that the next IBL tutorial will replace
// this ambient lighting with environment lighting).
vec3 ambient = vec3(0.03) * matDiff.rgb * matOccl;
vec3 color = ambient + matEmis.rgb + Lo;
// HDR tone-mapping
color = color / (color + vec3(1.0));
o_fragColor = vec4(color, 1.0);
// For correct alpha blending overwrite alpha component
o_fragColor.a = matDiff.a;
)"

Definition at line 1615 of file SLGLProgramGenerated.cpp.

◆ fragMainCook_3_FragColorSky

const string fragMainCook_3_FragColorSky
Initial value:
= R"(
// Build diffuse reflection from environment light map
vec3 F = fresnelSchlickRoughness(max(dot(N, E), 0.0), F0, matRough);
vec3 kS = F;
vec3 kD = 1.0 - kS;
kD *= 1.0 - matMetal;
vec3 irradiance = texture(u_skyIrradianceCubemap, N).rgb;
vec3 diffuse = kD * irradiance * matDiff.rgb;
// sample both the pre-filter map and the BRDF lut and combine them together as per the split-sum approximation to get the IBL specular part.
const float MAX_REFLECTION_LOD = 4.0;
vec3 prefilteredColor = textureLod(u_skyRoughnessCubemap, v_R_OS, matRough * MAX_REFLECTION_LOD).rgb;
vec2 brdf = texture(u_skyBrdfLutTexture, vec2(max(dot(N, E), 0.0), matRough)).rg;
vec3 specular = prefilteredColor * (F * brdf.x + brdf.y);
vec3 ambient = (diffuse + specular) * matOccl;
vec3 color = ambient + matEmis.rgb + Lo;
// Exposure tone mapping
vec3 mapped = vec3(1.0) - exp(-color * u_skyExposure);
o_fragColor = vec4(mapped, 1.0);
// For correct alpha blending overwrite alpha component
o_fragColor.a = matDiff.a;
)"

Definition at line 1629 of file SLGLProgramGenerated.cpp.

◆ fragMainVideoBkgd

const string fragMainVideoBkgd

Definition at line 1655 of file SLGLProgramGenerated.cpp.

◆ fragOutputs_o_fragColor

const string fragOutputs_o_fragColor
Initial value:
= R"(
out vec4 o_fragColor; // output fragment color)"

Definition at line 926 of file SLGLProgramGenerated.cpp.

◆ geomConfig_PS

const string geomConfig_PS
Initial value:
= R"(
layout (points) in; // Primitives that we received from vertex shader
layout (triangle_strip, max_vertices = 4) out; // Primitives that we will output and number of vertex that will be output)"

Definition at line 502 of file SLGLProgramGenerated.cpp.

◆ geomInput_PS_struct_Begin

const string geomInput_PS_struct_Begin
Initial value:
= R"(
in vertex { )"

Definition at line 505 of file SLGLProgramGenerated.cpp.

◆ geomInput_PS_struct_c

const string geomInput_PS_struct_c
Initial value:
= R"(
vec3 color; // Color of a particle )"

Definition at line 513 of file SLGLProgramGenerated.cpp.

◆ geomInput_PS_struct_End

const string geomInput_PS_struct_End
Initial value:
= R"(
} vert[]; )"

Definition at line 517 of file SLGLProgramGenerated.cpp.

◆ geomInput_PS_struct_r

const string geomInput_PS_struct_r
Initial value:
= R"(
float rotation; // Rotation of a particle)"

Definition at line 509 of file SLGLProgramGenerated.cpp.

◆ geomInput_PS_struct_s

const string geomInput_PS_struct_s
Initial value:
= R"(
float size; // Size of a particle )"

Definition at line 511 of file SLGLProgramGenerated.cpp.

◆ geomInput_PS_struct_t

const string geomInput_PS_struct_t
Initial value:
= R"(
float transparency; // Transparency of a particle)"

Definition at line 507 of file SLGLProgramGenerated.cpp.

◆ geomInput_PS_struct_texNum

const string geomInput_PS_struct_texNum
Initial value:
= R"(
uint texNum; // Num of texture in flipbook)"

Definition at line 515 of file SLGLProgramGenerated.cpp.

◆ geomInput_PS_u_c

const string geomInput_PS_u_c
Initial value:
= R"(
uniform vec4 u_color; // Particle color)"

Definition at line 528 of file SLGLProgramGenerated.cpp.

◆ geomInput_PS_u_col

const string geomInput_PS_u_col
Initial value:
= R"(
uniform int u_col; // Number of column of flipbook texture)"

Definition at line 530 of file SLGLProgramGenerated.cpp.

◆ geomInput_PS_u_row

const string geomInput_PS_u_row
Initial value:
= R"(
uniform int u_row; // Number of row of flipbook texture)"

Definition at line 532 of file SLGLProgramGenerated.cpp.

◆ geomInput_PS_u_ScaRa

const string geomInput_PS_u_ScaRa
Initial value:
= R"(
uniform float u_scale; // Particle scale
uniform float u_radiusW; // Particle width radius)
uniform float u_radiusH; // Particle height radius)"

Definition at line 524 of file SLGLProgramGenerated.cpp.

◆ geomInput_u_matrix_p

const string geomInput_u_matrix_p
Initial value:
= R"(
uniform mat4 u_pMatrix; // Projection matrix)"

Definition at line 520 of file SLGLProgramGenerated.cpp.

◆ geomInput_u_matrix_vertBillboard

const string geomInput_u_matrix_vertBillboard
Initial value:
= R"(
uniform mat4 u_vYawPMatrix; // Projection matrix)"

Definition at line 522 of file SLGLProgramGenerated.cpp.

◆ geomMain_PS_EndAll

const string geomMain_PS_EndAll
Initial value:
= R"(
EndPrimitive(); // Send primitives to fragment shader
} )"

Definition at line 759 of file SLGLProgramGenerated.cpp.

◆ geomMain_PS_Flipbook_fourCorners

const string geomMain_PS_Flipbook_fourCorners

Definition at line 655 of file SLGLProgramGenerated.cpp.

◆ geomMain_PS_Flipbook_fourCorners_horizBillboard

const string geomMain_PS_Flipbook_fourCorners_horizBillboard

Definition at line 688 of file SLGLProgramGenerated.cpp.

◆ geomMain_PS_Flipbook_fourCorners_vertBillboard

const string geomMain_PS_Flipbook_fourCorners_vertBillboard

Definition at line 725 of file SLGLProgramGenerated.cpp.

◆ geomMain_PS_fourCorners

const string geomMain_PS_fourCorners
Initial value:
= R"(
//BOTTOM LEFT
vec4 va = vec4(P.xy + (rot * vec2(-radiusW, -radiusH)), P.z, 1); //Position in view space
gl_Position = u_pMatrix * va; // Calculate position in clip space
v_texCoord = vec2(0.0, 0.0); // Texture coordinate
v_particleColor = color;
EmitVertex();
//BOTTOM RIGHT
vec4 vd = vec4(P.xy + (rot * vec2(radiusW, -radiusH)), P.z,1);
gl_Position = u_pMatrix * vd;
v_texCoord = vec2(1.0, 0.0);
v_particleColor = color;
EmitVertex();
//TOP LEFT
vec4 vb = vec4(P.xy + (rot * vec2(-radiusW,radiusH)) , P.z,1);
gl_Position = u_pMatrix * vb;
v_texCoord = vec2(0.0, 1.0);
v_particleColor = color;
EmitVertex();
//TOP RIGHT
vec4 vc = vec4(P.xy + (rot *vec2(radiusW, radiusH)), P.z,1);
gl_Position = u_pMatrix * vc;
v_texCoord = vec2(1.0, 1.0);
v_particleColor = color;
EmitVertex();)"

Definition at line 565 of file SLGLProgramGenerated.cpp.

◆ geomMain_PS_fourCorners_horizBillboard

const string geomMain_PS_fourCorners_horizBillboard

Definition at line 622 of file SLGLProgramGenerated.cpp.

◆ geomMain_PS_fourCorners_vertBillboard

const string geomMain_PS_fourCorners_vertBillboard
Initial value:
= R"(
//BOTTOM LEFT
vec4 va = vec4(P.xy + (rot * vec2(-radiusW, -radiusH)), P.z, 1); //Position in view space
gl_Position = u_pMatrix * (u_vYawPMatrix * va); // Calculate position in clip space
v_texCoord = vec2(0.0, 0.0); // Texture coordinate
v_particleColor = color;
EmitVertex();
//BOTTOM RIGHT
vec4 vd = vec4(P.xy + (rot * vec2(radiusW, -radiusH)), P.z,1);
gl_Position = u_pMatrix * (u_vYawPMatrix *vd);
v_texCoord = vec2(1.0, 0.0);
v_particleColor = color;
EmitVertex();
//TOP LEFT
vec4 vb = vec4(P.xy + (rot * vec2(-radiusW,radiusH)) , P.z,1);
gl_Position = u_pMatrix * (u_vYawPMatrix * vb);
v_texCoord = vec2(0.0, 1.0);
v_particleColor = color;
EmitVertex();
//TOP RIGHT
vec4 vc = vec4(P.xy + (rot *vec2(radiusW, radiusH)), P.z,1);
gl_Position = u_pMatrix * (u_vYawPMatrix * vc);
v_texCoord = vec2(1.0, 1.0);
v_particleColor = color;
EmitVertex(); )"

Definition at line 593 of file SLGLProgramGenerated.cpp.

◆ geomMain_PS_v_c

const string geomMain_PS_v_c
Initial value:
= R"(
vec4 color = u_color; // Particle color)"

Definition at line 556 of file SLGLProgramGenerated.cpp.

◆ geomMain_PS_v_cT

const string geomMain_PS_v_cT
Initial value:
= R"(
color.w *= vert[0].transparency; // Apply transparency)"

Definition at line 562 of file SLGLProgramGenerated.cpp.

◆ geomMain_PS_v_doColorOverLT

const string geomMain_PS_v_doColorOverLT
Initial value:
= R"(
vec4 color = vec4(vert[0].color, 1.0); // Particle color)"

Definition at line 558 of file SLGLProgramGenerated.cpp.

◆ geomMain_PS_v_p

const string geomMain_PS_v_p
Initial value:
= R"(
vec4 P = gl_in[0].gl_Position; // Position of the point that we received)"

Definition at line 549 of file SLGLProgramGenerated.cpp.

◆ geomMain_PS_v_rad

const string geomMain_PS_v_rad
Initial value:
= R"(
float radiusW = u_radiusW * scale;
float radiusH = u_radiusH * scale;)"

Definition at line 546 of file SLGLProgramGenerated.cpp.

◆ geomMain_PS_v_rot

const string geomMain_PS_v_rot
Initial value:
= R"(
mat2 rot = mat2(cos(vert[0].rotation),-sin(vert[0].rotation),
sin(vert[0].rotation), cos(vert[0].rotation)); // Matrix of rotation)"

Definition at line 551 of file SLGLProgramGenerated.cpp.

◆ geomMain_PS_v_rotIden

const string geomMain_PS_v_rotIden
Initial value:
= R"(
mat2 rot = mat2(1.0, 0.0, 0.0, 1.0); // Matrix of rotation)"

Definition at line 554 of file SLGLProgramGenerated.cpp.

◆ geomMain_PS_v_s

const string geomMain_PS_v_s
Initial value:
= R"(
float scale = u_scale;)"

Definition at line 542 of file SLGLProgramGenerated.cpp.

◆ geomMain_PS_v_sS

const string geomMain_PS_v_sS
Initial value:
= R"(
scale *= vert[0].size;)"

Definition at line 544 of file SLGLProgramGenerated.cpp.

◆ geomMain_PS_v_withoutColor

const string geomMain_PS_v_withoutColor
Initial value:
= R"(
vec4 color = vec4( 0.0, 0.0, 0.0, 1.0); // Particle color)"

Definition at line 560 of file SLGLProgramGenerated.cpp.

◆ geomOutput_PS_v_pC

const string geomOutput_PS_v_pC
Initial value:
= R"(
out vec4 v_particleColor; // The resulting color per vertex)"

Definition at line 535 of file SLGLProgramGenerated.cpp.

◆ geomOutput_PS_v_tC

const string geomOutput_PS_v_tC
Initial value:
= R"(
out vec2 v_texCoord; // Texture coordinate at vertex)"

Definition at line 537 of file SLGLProgramGenerated.cpp.

◆ main_Begin

const string main_Begin
Initial value:
= R"(
//-----------------------------------------------------------------------------
void main()
{)"

Definition at line 211 of file SLGLProgramGenerated.cpp.

◆ vertConstant_PS_pi

const string vertConstant_PS_pi
Initial value:
= R"(
#define PI 3.1415926538
#define TWOPI 6.2831853076
)"

Definition at line 79 of file SLGLProgramGenerated.cpp.

◆ vertFunction_PS_ColorOverLT

const string vertFunction_PS_ColorOverLT
Initial value:
= R"(
vec3 colorByAge(float age)
{
int cachePos = int(clamp(age, 0.0, 1.0) * 255.0) * 3;
vec3 color = vec3(u_colorArr[cachePos], u_colorArr[cachePos + 1], u_colorArr[cachePos + 2]);
return color;
})"

Definition at line 136 of file SLGLProgramGenerated.cpp.

◆ vertInput_a_pn

const string vertInput_a_pn
Initial value:
= R"(
layout (location = 0) in vec4 a_position; // Vertex position attribute
layout (location = 1) in vec3 a_normal; // Vertex normal attribute)"

Definition at line 28 of file SLGLProgramGenerated.cpp.

◆ vertInput_a_skinning

const string vertInput_a_skinning
Initial value:
= R"(
layout (location = 6) in ivec4 a_jointIds; // Vertex joint indices attributes
layout (location = 7) in vec4 a_jointWeights; // Vertex joint weights attributes)"

Definition at line 55 of file SLGLProgramGenerated.cpp.

◆ vertInput_a_tangent

const string vertInput_a_tangent
Initial value:
= R"(
layout (location = 5) in vec4 a_tangent; // Vertex tangent attribute)"

Definition at line 53 of file SLGLProgramGenerated.cpp.

◆ vertInput_a_uv0

const string vertInput_a_uv0
Initial value:
= R"(
layout (location = 2) in vec2 a_uv0; // Vertex tex.coord. 1 for diffuse color)"

Definition at line 49 of file SLGLProgramGenerated.cpp.

◆ vertInput_a_uv1

const string vertInput_a_uv1
Initial value:
= R"(
layout (location = 3) in vec2 a_uv1; // Vertex tex.coord. 2 for AO)"

Definition at line 51 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_a_initP

const string vertInput_PS_a_initP
Initial value:
= R"(
layout (location = 7) in vec3 a_initialPosition;// Particle initial position attribute)"

Definition at line 45 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_a_initV

const string vertInput_PS_a_initV
Initial value:
= R"(
layout (location = 3) in vec3 a_initialVelocity;// Particle initial velocity attribute)"

Definition at line 37 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_a_InstPos

const string vertInput_PS_a_InstPos
Initial value:
= R"(
layout (location = 8) in vec3 a_instancePos; // Particle instance triangle vertex position attribute)"

Definition at line 47 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_a_p

const string vertInput_PS_a_p
Initial value:
= R"(
layout (location = 0) in vec3 a_position; // Particle position attribute)"

Definition at line 31 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_a_r

const string vertInput_PS_a_r
Initial value:
= R"(
layout (location = 4) in float a_rotation; // Particle rotation attribute)"

Definition at line 39 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_a_r_angularVelo

const string vertInput_PS_a_r_angularVelo
Initial value:
= R"(
layout (location = 5) in float a_angularVelo; // Particle rotation rate attribute)"

Definition at line 41 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_a_st

const string vertInput_PS_a_st
Initial value:
= R"(
layout (location = 2) in float a_startTime; // Particle start time attribute)"

Definition at line 35 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_a_texNum

const string vertInput_PS_a_texNum
Initial value:
= R"(
layout (location = 6) in uint a_texNum; // Particle rotation attribute)"

Definition at line 43 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_a_v

const string vertInput_PS_a_v
Initial value:
= R"(
layout (location = 1) in vec3 a_velocity; // Particle velocity attribute)"

Definition at line 33 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_u_a_const

const string vertInput_PS_u_a_const
Initial value:
= R"(
uniform float u_accConst; // Particle acceleration constant)"

Definition at line 103 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_u_a_diffDir

const string vertInput_PS_u_a_diffDir
Initial value:
= R"(
uniform vec3 u_acceleration; // Particle acceleration)"

Definition at line 105 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_u_al_bernstein_alpha

const string vertInput_PS_u_al_bernstein_alpha
Initial value:
= R"(
uniform vec4 u_al_bernstein; // Bernstein polynomial for alpha over time)"

Definition at line 91 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_u_al_bernstein_size

const string vertInput_PS_u_al_bernstein_size
Initial value:
= R"(
uniform vec4 u_si_bernstein; // Bernstein polynomial for size over time)"

Definition at line 93 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_u_angularVelo

const string vertInput_PS_u_angularVelo
Initial value:
= R"(
uniform float u_angularVelo; // Particle angular velocity)"

Definition at line 109 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_u_col

const string vertInput_PS_u_col
Initial value:
= R"(
uniform int u_col; // Number of column of flipbook texture)"

Definition at line 111 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_u_colorOvLF

const string vertInput_PS_u_colorOvLF
Initial value:
= R"(
uniform float u_colorArr[256 * 3]; // Array of color value (for color over life))"

Definition at line 95 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_u_condFB

const string vertInput_PS_u_condFB
Initial value:
= R"(
uniform int u_condFB; // Condition to update texNum)"

Definition at line 115 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_u_deltaTime

const string vertInput_PS_u_deltaTime
Initial value:
= R"(
uniform float u_deltaTime; // Elapsed time between frames)"

Definition at line 99 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_u_g

const string vertInput_PS_u_g
Initial value:
= R"(
uniform vec3 u_gravity; // Particle gravity)"

Definition at line 107 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_u_pgPos

const string vertInput_PS_u_pgPos
Initial value:
= R"(
uniform vec3 u_pGPosition; // Particle Generator position)"

Definition at line 101 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_u_row

const string vertInput_PS_u_row
Initial value:
= R"(
uniform int u_row; // Number of row of flipbook texture)"

Definition at line 113 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_u_ScaRa

const string vertInput_PS_u_ScaRa
Initial value:
= R"(
uniform float u_scale; // Particle scale
uniform float u_radiusW; // Particle width radius)
uniform float u_radiusH; // Particle height radius)"

Definition at line 186 of file SLGLProgramGenerated.cpp.

◆ vertInput_PS_u_time

const string vertInput_PS_u_time
Initial value:
= R"(
uniform float u_time; // Simulation time
uniform float u_difTime; // Simulation delta time after frustum culling
uniform float u_tTL; // Time to live of a particle)"

Definition at line 85 of file SLGLProgramGenerated.cpp.

◆ vertInput_u_lightNm

const string vertInput_u_lightNm
Initial value:
= R"(
uniform vec4 u_lightPosVS[NUM_LIGHTS]; // position of light in view space
uniform vec3 u_lightSpotDir[NUM_LIGHTS]; // spot direction in view space
uniform float u_lightSpotDeg[NUM_LIGHTS]; // spot cutoff angle 1-180 degrees)"

Definition at line 73 of file SLGLProgramGenerated.cpp.

◆ vertInput_u_matrices_all

const string vertInput_u_matrices_all
Initial value:
= R"(
uniform mat4 u_mMatrix; // Model matrix (object to world transform)
uniform mat4 u_vMatrix; // View matrix (world to camera transform)
uniform mat4 u_pMatrix; // Projection matrix (camera to normalize device coords.))"

Definition at line 59 of file SLGLProgramGenerated.cpp.

◆ vertInput_u_matrix_p

const string vertInput_u_matrix_p
Initial value:
= R"(
uniform mat4 u_pMatrix; // Projection matrix)"

Definition at line 180 of file SLGLProgramGenerated.cpp.

◆ vertInput_u_matrix_vertBillboard

const string vertInput_u_matrix_vertBillboard
Initial value:
= R"(
uniform mat4 u_vYawPMatrix; // Projection matrix)"

Definition at line 182 of file SLGLProgramGenerated.cpp.

◆ vertInput_u_matrix_vOmv

const string vertInput_u_matrix_vOmv
Initial value:
= R"(
uniform mat4 u_vOmvMatrix; // view or modelview matrix)"

Definition at line 64 of file SLGLProgramGenerated.cpp.

◆ vertInput_u_skinning

const string vertInput_u_skinning
Initial value:
= R"(
uniform mat4 u_jointMatrices[100]; // Joint matrices for skinning
uniform bool u_skinningEnabled; // Flag if the shader should perform skinning
)"

Definition at line 67 of file SLGLProgramGenerated.cpp.

◆ vertMain_EndAll

const string vertMain_EndAll
Initial value:
= R"(
// pass the vertex w. the fix-function transform
gl_Position = u_pMatrix * mvMatrix * ${localPosition};
}
)"

Definition at line 429 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_EndAll

const string vertMain_PS_EndAll
Initial value:
= R"(
// Modelview matrix multiplication with (particle position + particle generator position)
// Calculate position in view space
gl_Position = u_vOmvMatrix * vec4(a_position, 1);
}
)"

Definition at line 418 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_EndAll_VertBillboard

const string vertMain_PS_EndAll_VertBillboard
Initial value:
= R"(
gl_Position = vec4(a_position, 1);
}
)"

Definition at line 425 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_instanced_EndAll

const string vertMain_PS_instanced_EndAll
Initial value:
= R"(
// Modelview matrix multiplication with (particle position + particle generator position)
// Calculate position in view space
gl_Position = u_pMatrix * (u_vOmvMatrix * vec4(a_position, 1) + vec4(position, 0.0));
}
)"

Definition at line 405 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_instanced_EndAll_VertBillboard

const string vertMain_PS_instanced_EndAll_VertBillboard
Initial value:
= R"(
//gl_Position = vec4(a_position + a_instancePos, 1);
gl_Position = u_pMatrix * u_vYawPMatrix * vec4(a_position + position, 1.0);
}
)"

Definition at line 412 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_instanced_position

const string vertMain_PS_instanced_position
Initial value:
= R"(
vec3 position = a_instancePos;
)"

Definition at line 365 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_instanced_rotate

const string vertMain_PS_instanced_rotate
Initial value:
= R"(
mat2 rot = mat2(cos(a_rotation),-sin(a_rotation),
sin(a_rotation), cos(a_rotation)); // Matrix of rotation
position = vec3(rot * position.xy, position.z);
)"

Definition at line 400 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_instanced_scale

const string vertMain_PS_instanced_scale
Initial value:
= R"(
position = vec3(u_radiusW * position.x, u_radiusH * position.y, position.z);
position = u_scale * position;
)"

Definition at line 396 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_instanced_v_s

const string vertMain_PS_instanced_v_s
Initial value:
= R"(
float size = age / u_tTL;)"

Definition at line 368 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_instanced_v_s_curve

const string vertMain_PS_instanced_v_s_curve
Initial value:
= R"(
size = pow(size,3.0) * u_si_bernstein.x +
pow(size,2.0) * u_si_bernstein.y +
size * u_si_bernstein.z +
u_si_bernstein.w; // Get transparency by bezier curve)"

Definition at line 370 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_instanced_v_sS

const string vertMain_PS_instanced_v_sS
Initial value:
= R"(
position = size * position;
)"

Definition at line 375 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_instanced_v_t_begin

const string vertMain_PS_instanced_v_t_begin
Initial value:
= R"(
if(age < 0.0)
transparency = 0.0; // To be discard, because the particle is to be born
else
{
transparency = age / u_tTL; // Get by the ratio age:lifetime)"

Definition at line 383 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_instanced_v_t_curve

const string vertMain_PS_instanced_v_t_curve
Initial value:
= R"(
transparency = pow(transparency,3.0) * u_al_bernstein.x +
pow(transparency,2.0) * u_al_bernstein.y +
transparency * u_al_bernstein.z +
u_al_bernstein.w; // Get transparency by bezier curve)"

Definition at line 391 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_instanced_v_t_default

const string vertMain_PS_instanced_v_t_default
Initial value:
= R"(
if(age < 0.0)
transparency = 0.0; // To be discard, because the particle is to be born
else
transparency = 1.0;)"

Definition at line 378 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_instanced_v_t_linear

const string vertMain_PS_instanced_v_t_linear
Initial value:
= R"(
transparency = 1.0 - transparency; // Linear)"

Definition at line 389 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_alive_a_const

const string vertMain_PS_U_alive_a_const
Initial value:
= R"(
tf_velocity += tf_initialVelocity * u_deltaTime * u_accConst; // Amplify the velocity)"

Definition at line 484 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_alive_a_diffDir

const string vertMain_PS_U_alive_a_diffDir
Initial value:
= R"(
tf_velocity += u_deltaTime * u_acceleration; // Amplify the velocity)"

Definition at line 486 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_alive_g

const string vertMain_PS_U_alive_g
Initial value:
= R"(
tf_velocity += u_deltaTime * u_gravity; // Apply gravity)"

Definition at line 488 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_alive_p

const string vertMain_PS_U_alive_p
Initial value:
= R"(
} else
{
// The particle is alive, update.
tf_position += tf_velocity * u_deltaTime; // Scale the translation by the delta time)"

Definition at line 475 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_alive_texNum

const string vertMain_PS_U_alive_texNum
Initial value:
= R"(
if(u_condFB == 1)
{
tf_texNum++; // Increment to draw next texture (flipbook)
tf_texNum = uint(mod(float(tf_texNum), float(u_col * u_row))); // Modulo to not exceed the max and reset
})"

Definition at line 490 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_Begin

const string vertMain_PS_U_Begin
Initial value:
= R"(
vec4 P = vec4(a_position.xyz, 1.0); // Need to be here for the compilation
gl_Position = P; // Need to be here for the compilation)"

Definition at line 436 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_bornDead

const string vertMain_PS_U_bornDead
Initial value:
= R"(
tf_startTime += u_difTime; // Add time to resume after frustum culling
if( u_time >= tf_startTime )
{ // Check if the particle is born
float age = u_time - tf_startTime; // Get the age of the particle
if( age > u_tTL)
{ )"

Definition at line 455 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_EndAll

const string vertMain_PS_U_EndAll
Initial value:
= R"(
}
}
})"

Definition at line 496 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_reset_p

const string vertMain_PS_U_reset_p
Initial value:
= R"(
// The particle is past its lifetime, recycle.
tf_position = u_pGPosition; // Reset position)"

Definition at line 463 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_reset_shape_p

const string vertMain_PS_U_reset_shape_p
Initial value:
= R"(
// The particle is past its lifetime, recycle.
tf_position = a_initialPosition + u_pGPosition; // Reset position)"

Definition at line 466 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_reset_st

const string vertMain_PS_U_reset_st
Initial value:
= R"(
tf_startTime = u_time; // Reset start time to actual time)"

Definition at line 473 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_reset_st_counterGap

const string vertMain_PS_U_reset_st_counterGap
Initial value:
= R"(
tf_startTime = u_time + (age - u_tTL); // Reset start time to actual time with counter gap)"

Definition at line 471 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_reset_v

const string vertMain_PS_U_reset_v
Initial value:
= R"(
tf_velocity = a_initialVelocity; // Reset velocity)"

Definition at line 469 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_v_init_initP

const string vertMain_PS_U_v_init_initP
Initial value:
= R"(
tf_initialPosition = a_initialPosition; // Init the output variable)"

Definition at line 453 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_v_init_initV

const string vertMain_PS_U_v_init_initV
Initial value:
= R"(
tf_initialVelocity = a_initialVelocity; // Init the output variable)"

Definition at line 445 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_v_init_p

const string vertMain_PS_U_v_init_p
Initial value:
= R"(
tf_position = a_position; // Init the output variable)"

Definition at line 439 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_v_init_r

const string vertMain_PS_U_v_init_r
Initial value:
= R"(
tf_rotation = a_rotation; // Init the output variable)"

Definition at line 447 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_v_init_r_angularVelo

const string vertMain_PS_U_v_init_r_angularVelo
Initial value:
= R"(
tf_angularVelo = a_angularVelo; // Init the output variable)"

Definition at line 449 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_v_init_st

const string vertMain_PS_U_v_init_st
Initial value:
= R"(
tf_startTime = a_startTime; // Init the output variable)"

Definition at line 443 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_v_init_texNum

const string vertMain_PS_U_v_init_texNum
Initial value:
= R"(
tf_texNum = a_texNum; // Init the output variable)"

Definition at line 451 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_v_init_v

const string vertMain_PS_U_v_init_v
Initial value:
= R"(
tf_velocity = a_velocity; // Init the output variable)"

Definition at line 441 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_v_rConst

const string vertMain_PS_U_v_rConst
Initial value:
= R"(
tf_rotation = mod(tf_rotation + (u_angularVelo*u_deltaTime), TWOPI);)"

Definition at line 480 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_U_v_rRange

const string vertMain_PS_U_v_rRange
Initial value:
= R"(
tf_rotation = mod(tf_rotation + (tf_angularVelo*u_deltaTime), TWOPI);)"

Definition at line 482 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_v_a

const string vertMain_PS_v_a
Initial value:
= R"(
float age = u_time - a_startTime; // Get the age of the particle)"

Definition at line 350 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_v_age

const string vertMain_PS_v_age
Initial value:
= R"(
v_age = age;)"

Definition at line 354 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_v_doColorOverLT

const string vertMain_PS_v_doColorOverLT
Initial value:
= R"(
vert.color = colorByAge(age/u_tTL);)"

Definition at line 342 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_v_r

const string vertMain_PS_v_r
Initial value:
= R"(
vert.rotation = a_rotation;)"

Definition at line 332 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_v_s

const string vertMain_PS_v_s
Initial value:
= R"(
vert.size = age / u_tTL;)"

Definition at line 334 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_v_s_curve

const string vertMain_PS_v_s_curve
Initial value:
= R"(
vert.size = pow(vert.size,3.0) * u_si_bernstein.x +
pow(vert.size,2.0) * u_si_bernstein.y +
vert.size * u_si_bernstein.z +
u_si_bernstein.w; // Get transparency by bezier curve)"

Definition at line 336 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_v_t_begin

const string vertMain_PS_v_t_begin
Initial value:
= R"(
if(age < 0.0)
vert.transparency = 0.0; // To be discard, because the particle is to be born
else
{
vert.transparency = age / u_tTL; // Get by the ratio age:lifetime)"

Definition at line 317 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_v_t_curve

const string vertMain_PS_v_t_curve
Initial value:
= R"(
vert.transparency = pow(vert.transparency,3.0) * u_al_bernstein.x +
pow(vert.transparency,2.0) * u_al_bernstein.y +
vert.transparency * u_al_bernstein.z +
u_al_bernstein.w; // Get transparency by bezier curve)"

Definition at line 325 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_v_t_default

const string vertMain_PS_v_t_default
Initial value:
= R"(
if(age < 0.0)
vert.transparency = 0.0; // To be discard, because the particle is to be born
else
vert.transparency = 1.0;)"

Definition at line 312 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_v_t_end

const string vertMain_PS_v_t_end
Initial value:
= R"(
})"

Definition at line 330 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_v_t_linear

const string vertMain_PS_v_t_linear
Initial value:
= R"(
vert.transparency = 1.0 - vert.transparency; // Linear)"

Definition at line 323 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_v_tC

const string vertMain_PS_v_tC
Initial value:
= R"(
v_texCoord = 0.5 * (a_instancePos.xy + vec2(1.0));)"

Definition at line 352 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_v_tC_flipbook

const string vertMain_PS_v_tC_flipbook
Initial value:
= R"(
int actCI = int(mod(float(a_texNum), float(u_col)));
float actC = float(actCI);
float actR = floor(float(int(a_texNum) - actCI) / float(u_col));
vec2 p = 0.5 * (a_instancePos.xy + vec2(1.0));
v_texCoord = vec2((actC + p.x)/float(u_col), 1.0 - (actR - p.y)/float(u_row));
)"

Definition at line 356 of file SLGLProgramGenerated.cpp.

◆ vertMain_PS_v_texNum

const string vertMain_PS_v_texNum
Initial value:
= R"(
vert.texNum = a_texNum;)"

Definition at line 348 of file SLGLProgramGenerated.cpp.

◆ vertMain_skinning

const string vertMain_skinning
Initial value:
= R"(
vec4 skinnedPosition;
vec3 skinnedNormal;
if (u_skinningEnabled)
{
// In skinned skeleton animation, every vertex of a mesh is transformed by
// max. four joints (bones) of a skeleton identified by indices. The joint
// matrix is a weighted sum of four joint matrices and can change per frame
// to animate the mesh.
mat4 jm = u_jointMatrices[int(a_jointIds.x)] * a_jointWeights.x
+ u_jointMatrices[int(a_jointIds.y)] * a_jointWeights.y
+ u_jointMatrices[int(a_jointIds.z)] * a_jointWeights.z
+ u_jointMatrices[int(a_jointIds.w)] * a_jointWeights.w;
skinnedPosition = jm * a_position;
skinnedNormal = mat3(jm) * a_normal;
}
else
{
skinnedPosition = a_position;
skinnedNormal = a_normal;
}
)"

Definition at line 233 of file SLGLProgramGenerated.cpp.

◆ vertMain_skinning_Nm

const string vertMain_skinning_Nm
Initial value:
= R"(
vec4 skinnedPosition;
vec3 skinnedNormal;
vec4 skinnedTangent;
if (u_skinningEnabled)
{
// In skinned skeleton animation, every vertex of a mesh is transformed by
// max. four joints (bones) of a skeleton identified by indices. The joint
// matrix is a weighted sum of four joint matrices and can change per frame
// to animate the mesh.
mat4 jm = u_jointMatrices[int(a_jointIds.x)] * a_jointWeights.x
+ u_jointMatrices[int(a_jointIds.y)] * a_jointWeights.y
+ u_jointMatrices[int(a_jointIds.z)] * a_jointWeights.z
+ u_jointMatrices[int(a_jointIds.w)] * a_jointWeights.w;
skinnedPosition = jm * a_position;
skinnedNormal = mat3(jm) * a_normal;
skinnedTangent = vec4(mat3(jm) * a_tangent.xyz, a_tangent.w);
}
else
{
skinnedPosition = a_position;
skinnedNormal = a_normal;
skinnedTangent = a_tangent;
}
)"

Definition at line 257 of file SLGLProgramGenerated.cpp.

◆ vertMain_TBN_Nm

const string vertMain_TBN_Nm
Initial value:
= R"(
// Building the matrix Eye Space -> Tangent Space
// See the math behind at: http://www.terathon.com/code/tangent.html
vec3 n = normalize(nMatrix * ${localNormal});
vec3 t = normalize(nMatrix * ${localTangent}.xyz);
vec3 b = cross(n, t) * ${localTangent}.w; // bitangent w. corrected handedness
mat3 TBN = mat3(t,b,n);
// Transform vector to the eye into tangent space
v_eyeDirTS = -v_P_VS; // eye vector in view space
v_eyeDirTS *= TBN;
for (int i = 0; i < NUM_LIGHTS; ++i)
{
// Transform spot direction into tangent space
v_spotDirTS[i] = u_lightSpotDir[i];
v_spotDirTS[i] *= TBN;
// Transform vector to the light 0 into tangent space
vec3 L = u_lightPosVS[i].xyz - v_P_VS;
v_lightDirTS[i] = L;
v_lightDirTS[i] *= TBN;
}
)"

Definition at line 284 of file SLGLProgramGenerated.cpp.

◆ vertMain_v_N_VS

const string vertMain_v_N_VS
Initial value:
= R"(
mat3 invMvMatrix = mat3(inverse(mvMatrix));
mat3 nMatrix = transpose(invMvMatrix);
v_N_VS = vec3(nMatrix * ${localNormal}); // vertex normal in view space)"

Definition at line 221 of file SLGLProgramGenerated.cpp.

◆ vertMain_v_P_VS

const string vertMain_v_P_VS
Initial value:
= R"(
mat4 mvMatrix = u_vMatrix * u_mMatrix;
v_P_VS = vec3(mvMatrix * ${localPosition}); // vertex position in view space)"

Definition at line 216 of file SLGLProgramGenerated.cpp.

◆ vertMain_v_P_WS_Sm

const string vertMain_v_P_WS_Sm
Initial value:
= R"(
v_P_WS = vec3(u_mMatrix * ${localPosition}); // vertex position in world space)"

Definition at line 219 of file SLGLProgramGenerated.cpp.

◆ vertMain_v_R_OS

const string vertMain_v_R_OS
Initial value:
= R"(
vec3 I = normalize(v_P_VS);
vec3 N = normalize(v_N_VS);
v_R_OS = invMvMatrix * reflect(I, N); // R = I-2.0*dot(N,I)*N;)"

Definition at line 225 of file SLGLProgramGenerated.cpp.

◆ vertMain_v_uv0

const string vertMain_v_uv0
Initial value:
= R"(
v_uv0 = a_uv0; // pass diffuse color tex.coord. 0 for interpolation)"

Definition at line 229 of file SLGLProgramGenerated.cpp.

◆ vertMain_v_uv1

const string vertMain_v_uv1
Initial value:
= R"(
v_uv1 = a_uv1; // pass diffuse color tex.coord. 1 for interpolation)"

Definition at line 231 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_age

const string vertOutput_PS_age
Initial value:
= R"(
out float v_age; // Age of a particle)"

Definition at line 344 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_instanced_transparency

const string vertOutput_PS_instanced_transparency
Initial value:
= R"(
out float transparency; // transparency of a particle )"

Definition at line 169 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_struct_Begin

const string vertOutput_PS_struct_Begin
Initial value:
= R"(
out vertex
{ )"

Definition at line 152 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_struct_c

const string vertOutput_PS_struct_c
Initial value:
= R"(
vec3 color; // Color of a particle )"

Definition at line 162 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_struct_End

const string vertOutput_PS_struct_End
Initial value:
= R"(
} vert; )"

Definition at line 166 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_struct_r

const string vertOutput_PS_struct_r
Initial value:
= R"(
float rotation; // Rotation of a particle)"

Definition at line 158 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_struct_s

const string vertOutput_PS_struct_s
Initial value:
= R"(
float size; // Size of a particle )"

Definition at line 160 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_struct_t

const string vertOutput_PS_struct_t
Initial value:
= R"(
float transparency; // Transparency of a particle)"

Definition at line 156 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_struct_texNum

const string vertOutput_PS_struct_texNum
Initial value:
= R"(
uint texNum; // Num of texture in flipbook)"

Definition at line 164 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_tf_initP

const string vertOutput_PS_tf_initP
Initial value:
= R"(
out vec3 tf_initialPosition; // To transform feedback)"

Definition at line 207 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_tf_initV

const string vertOutput_PS_tf_initV
Initial value:
= R"(
out vec3 tf_initialVelocity; // To transform feedback)"

Definition at line 199 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_tf_p

const string vertOutput_PS_tf_p
Initial value:
= R"(
out vec3 tf_position; // To transform feedback)"

Definition at line 192 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_tf_r

const string vertOutput_PS_tf_r
Initial value:
= R"(
out float tf_rotation; // To transform feedback)"

Definition at line 201 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_tf_r_angularVelo

const string vertOutput_PS_tf_r_angularVelo
Initial value:
= R"(
out float tf_angularVelo; // To transform feedback)"

Definition at line 203 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_tf_st

const string vertOutput_PS_tf_st
Initial value:
= R"(
out float tf_startTime; // To transform feedback)"

Definition at line 197 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_tf_texNum

const string vertOutput_PS_tf_texNum
Initial value:
= R"(
flat out uint tf_texNum; // To transform feedback)"

Definition at line 205 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_tf_v

const string vertOutput_PS_tf_v
Initial value:
= R"(
out vec3 tf_velocity; // To transform feedback)"

Definition at line 195 of file SLGLProgramGenerated.cpp.

◆ vertOutput_PS_v_tC

const string vertOutput_PS_v_tC
Initial value:
= R"(
out vec2 v_texCoord; // Texture coordinate at vertex)"

Definition at line 539 of file SLGLProgramGenerated.cpp.

◆ vertOutput_v_lightVecTS

const string vertOutput_v_lightVecTS
Initial value:
= R"(
out vec3 v_eyeDirTS; // Vector to the eye in tangent space
out vec3 v_lightDirTS[NUM_LIGHTS]; // Vector to the light 0 in tangent space
out vec3 v_spotDirTS[NUM_LIGHTS]; // Spot direction in tangent space)"

Definition at line 131 of file SLGLProgramGenerated.cpp.

◆ vertOutput_v_N_VS

const string vertOutput_v_N_VS
Initial value:
= R"(
out vec3 v_N_VS; // Normal at P_VS in view space (VS))"

Definition at line 123 of file SLGLProgramGenerated.cpp.

◆ vertOutput_v_P_VS

const string vertOutput_v_P_VS
Initial value:
= R"(
out vec3 v_P_VS; // Point of illumination in view space (VS))"

Definition at line 119 of file SLGLProgramGenerated.cpp.

◆ vertOutput_v_P_WS

const string vertOutput_v_P_WS
Initial value:
= R"(
out vec3 v_P_WS; // Point of illumination in world space (WS))"

Definition at line 121 of file SLGLProgramGenerated.cpp.

◆ vertOutput_v_R_OS

const string vertOutput_v_R_OS
Initial value:
= R"(
out vec3 v_R_OS; // Reflection vector in object space (WS))"

Definition at line 125 of file SLGLProgramGenerated.cpp.

◆ vertOutput_v_uv0

const string vertOutput_v_uv0
Initial value:
= R"(
out vec2 v_uv0; // Texture coordinate 0 output)"

Definition at line 127 of file SLGLProgramGenerated.cpp.

◆ vertOutput_v_uv1

const string vertOutput_v_uv1
Initial value:
= R"(
out vec2 v_uv1; // Texture coordinate 1 output)"

Definition at line 129 of file SLGLProgramGenerated.cpp.