pcsx2/plugins/GSdx/res/glsl/common_header.glsl

110 lines
1.8 KiB
GLSL

//#version 420 // Keep it for editor detection
//////////////////////////////////////////////////////////////////////
// Common Interface Definition
//////////////////////////////////////////////////////////////////////
#ifdef VERTEX_SHADER
out gl_PerVertex {
vec4 gl_Position;
float gl_PointSize;
#if !pGL_ES
float gl_ClipDistance[1];
#endif
};
#endif
#ifdef GEOMETRY_SHADER
in gl_PerVertex {
vec4 gl_Position;
float gl_PointSize;
#if !pGL_ES
float gl_ClipDistance[1];
#endif
} gl_in[];
out gl_PerVertex {
vec4 gl_Position;
float gl_PointSize;
#if !pGL_ES
float gl_ClipDistance[1];
#endif
};
#endif
//////////////////////////////////////////////////////////////////////
// Constant Buffer Definition
//////////////////////////////////////////////////////////////////////
layout(std140, binding = 10) uniform cb10
{
vec4 BGColor;
};
layout(std140, binding = 11) uniform cb11
{
vec2 ZrH;
float hH;
};
layout(std140, binding = 14) uniform cb14
{
vec2 _xyFrame;
vec4 _rcpFrame;
};
layout(std140, binding = 15) uniform cb15
{
ivec4 ScalingFactor;
};
layout(std140, binding = 20) uniform cb20
{
vec2 VertexScale;
vec2 VertexOffset;
vec2 _removed_TextureScale;
vec2 PointSize;
};
layout(std140, binding = 21) uniform cb21
{
vec3 FogColor;
float AREF;
vec4 WH;
vec2 TA;
float _pad0;
float Af;
uvec4 MskFix;
uvec4 FbMask;
vec4 HalfTexel;
vec4 MinMax;
vec2 TextureScale;
vec2 TC_OffsetHack;
};
layout(std140, binding = 22) uniform cb22
{
vec4 rt_size;
};
//////////////////////////////////////////////////////////////////////
// Default Sampler
//////////////////////////////////////////////////////////////////////
#ifdef FRAGMENT_SHADER
layout(binding = 0) uniform sampler2D TextureSampler;
#endif