2022-01-17 14:45:22 +01:00
|
|
|
#ifndef USE_GPU_SHADER_CREATE_INFO
|
2020-04-23 23:05:39 +02:00
|
|
|
uniform mat4 ModelViewProjectionMatrix;
|
|
|
|
uniform mat4 ModelMatrix;
|
|
|
|
uniform vec4 ClipPlane;
|
|
|
|
|
|
|
|
in vec3 pos;
|
|
|
|
|
2022-01-17 14:45:22 +01:00
|
|
|
# if !defined(UNIFORM)
|
2020-04-23 23:05:39 +02:00
|
|
|
in vec4 color;
|
|
|
|
|
|
|
|
out vec4 finalColor_g;
|
2022-01-17 14:45:22 +01:00
|
|
|
# endif
|
2020-04-23 23:05:39 +02:00
|
|
|
|
2022-01-17 14:45:22 +01:00
|
|
|
# ifdef CLIP
|
2020-04-23 23:05:39 +02:00
|
|
|
out float clip_g;
|
2022-01-17 14:45:22 +01:00
|
|
|
# endif
|
2020-04-23 23:05:39 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
|
|
|
|
#if !defined(UNIFORM)
|
|
|
|
finalColor_g = color;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CLIP
|
|
|
|
clip_g = dot(ModelMatrix * vec4(pos, 1.0), ClipPlane);
|
|
|
|
#endif
|
|
|
|
}
|