2016-04-24 08:54:39 +00:00
|
|
|
//#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
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
2016-06-05 14:42:52 +00:00
|
|
|
// Performance note, some drivers (nouveau) will validate all Constant Buffers
|
|
|
|
// even if only one was updated.
|
2016-04-24 09:07:46 +00:00
|
|
|
|
2016-06-05 14:42:52 +00:00
|
|
|
#if defined(VERTEX_SHADER) || defined(GEOMETRY_SHADER)
|
2021-12-20 13:48:13 +00:00
|
|
|
layout(std140, binding = 1) uniform cb20
|
2016-04-24 08:54:39 +00:00
|
|
|
{
|
2016-06-21 07:45:37 +00:00
|
|
|
vec2 VertexScale;
|
|
|
|
vec2 VertexOffset;
|
|
|
|
|
2021-11-16 04:46:38 +00:00
|
|
|
vec2 TextureScale;
|
|
|
|
vec2 TextureOffset;
|
2016-06-21 07:45:37 +00:00
|
|
|
|
|
|
|
vec2 PointSize;
|
2020-05-23 18:37:51 +00:00
|
|
|
uint MaxDepth;
|
|
|
|
uint pad_cb20;
|
2016-04-24 08:54:39 +00:00
|
|
|
};
|
2016-06-05 14:42:52 +00:00
|
|
|
#endif
|
2016-04-24 08:54:39 +00:00
|
|
|
|
2016-06-05 14:42:52 +00:00
|
|
|
#if defined(VERTEX_SHADER) || defined(FRAGMENT_SHADER)
|
2021-10-20 07:52:05 +00:00
|
|
|
layout(std140, binding = 0) uniform cb21
|
2016-04-24 08:54:39 +00:00
|
|
|
{
|
|
|
|
vec3 FogColor;
|
|
|
|
float AREF;
|
|
|
|
|
|
|
|
vec4 WH;
|
|
|
|
|
|
|
|
vec2 TA;
|
2021-12-09 14:05:16 +00:00
|
|
|
float MaxDepthPS;
|
2016-04-24 08:54:39 +00:00
|
|
|
float Af;
|
|
|
|
|
|
|
|
uvec4 MskFix;
|
|
|
|
|
|
|
|
uvec4 FbMask;
|
|
|
|
|
|
|
|
vec4 HalfTexel;
|
|
|
|
|
|
|
|
vec4 MinMax;
|
|
|
|
|
2021-12-21 07:41:45 +00:00
|
|
|
ivec4 ChannelShuffle;
|
|
|
|
|
2016-04-24 08:54:39 +00:00
|
|
|
vec2 TC_OffsetHack;
|
2021-12-21 07:41:45 +00:00
|
|
|
vec2 pad_cb21;
|
2019-09-15 18:49:34 +00:00
|
|
|
|
|
|
|
mat4 DitherMatrix;
|
2016-04-24 08:54:39 +00:00
|
|
|
};
|
2016-06-05 14:42:52 +00:00
|
|
|
#endif
|
2016-04-24 08:54:39 +00:00
|
|
|
|
2016-06-05 14:42:52 +00:00
|
|
|
//layout(std140, binding = 22) uniform cb22
|
|
|
|
//{
|
|
|
|
// vec4 rt_size;
|
|
|
|
//};
|
2016-04-24 08:54:39 +00:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
// Default Sampler
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#ifdef FRAGMENT_SHADER
|
|
|
|
|
|
|
|
layout(binding = 0) uniform sampler2D TextureSampler;
|
|
|
|
|
|
|
|
#endif
|