Add support for 8 vertex colors. Set up binding for all 8 texcoords.
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, macos-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, macos-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
This commit is contained in:
@@ -46,7 +46,7 @@ void main()
|
||||
gl_Position.z += SHADOW_BIAS;
|
||||
/*
|
||||
// Pass UV co-ordinates
|
||||
texCoord = vertex_uv.st;
|
||||
texCoord = vertex_texcoord0.st;
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
@@ -33,12 +33,12 @@
|
||||
|
||||
layout(location = 0) out mediump vec2 textureCoordinate;
|
||||
layout(location = 0) in vec3 vertex_position;
|
||||
layout(location = 1) in lowp vec2 vertex_uv;
|
||||
layout(location = 1) in lowp vec2 vertex_texcoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(vertex_position, 1.0);
|
||||
textureCoordinate = vertex_uv;
|
||||
textureCoordinate = vertex_texcoord0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
//
|
||||
|
||||
|
||||
in mediump vec2 vertex_uv;
|
||||
in mediump vec2 vertex_texcoord0;
|
||||
uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices
|
||||
uniform mediump vec4 viewport;
|
||||
uniform mediump float flare_size;
|
||||
@@ -49,8 +49,8 @@ void main() {
|
||||
offset_center.xyz += vec3(sin((time_absolute + vertex_position.x * 100.0) * 0.05), sin((time_absolute + vertex_position.y * 100.0) * 0.07), sin((time_absolute + vertex_position.z * 100.0) * 0.03)) * 0.05;
|
||||
offset_center = vec4(mod(offset_center.x + 1.0, 2.0) - 1.0, mod(offset_center.y + 1.0, 2.0) - 1.0, mod(offset_center.z + 1.0, 2.0) - 1.0, 1.0);
|
||||
highp vec4 particle_center = mvp_matrix * offset_center;
|
||||
texCoord = vertex_uv * 3.46410161513775; // 3.46410161513775 = 2 * sqrt(3); 1 / (2 * sqrt(3)) is the radius of a circle encompased by a equilateral triangle with a side length of 1.
|
||||
gl_Position = particle_center + vec4(vertex_uv.x * viewport.w / viewport.z * 2.0 - 1.0, vertex_uv.y * 2.0 - 1.0, 0.0, 0.0) * flare_size;
|
||||
texCoord = vertex_texcoord0 * 3.46410161513775; // 3.46410161513775 = 2 * sqrt(3); 1 / (2 * sqrt(3)) is the radius of a circle encompased by a equilateral triangle with a side length of 1.
|
||||
gl_Position = particle_center + vec4(vertex_texcoord0.x * viewport.w / viewport.z * 2.0 - 1.0, vertex_texcoord0.y * 2.0 - 1.0, 0.0, 0.0) * flare_size;
|
||||
|
||||
shadowMapCoord1 = shadow_mvp1 * offset_center;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
//
|
||||
|
||||
|
||||
in vec2 vertex_uv;
|
||||
in vec2 vertex_texcoord0;
|
||||
uniform mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices
|
||||
uniform vec4 viewport;
|
||||
uniform float flare_size;
|
||||
@@ -38,6 +38,6 @@ uniform float flare_size;
|
||||
out vec2 texCoord;
|
||||
|
||||
void main() {
|
||||
texCoord = vertex_uv;
|
||||
gl_Position = mvp_matrix * vec4(0.0, 0.0, 0.0, 1.0) + vec4(vertex_uv.x * viewport.w / viewport.z * 2.0 - 1.0, vertex_uv.y * 2.0 - 1.0, 0.0, 0.0) * flare_size;
|
||||
texCoord = vertex_texcoord0;
|
||||
gl_Position = mvp_matrix * vec4(0.0, 0.0, 0.0, 1.0) + vec4(vertex_texcoord0.x * viewport.w / viewport.z * 2.0 - 1.0, vertex_texcoord0.y * 2.0 - 1.0, 0.0, 0.0) * flare_size;
|
||||
}
|
||||
|
||||
@@ -42,10 +42,10 @@ layout(location = 1) in vec3 vertex_normal;
|
||||
#if HAS_NORMAL_MAP == 1
|
||||
layout(location = 2) in vec3 vertex_tangent;
|
||||
#endif
|
||||
layout(location = 3) in lowp vec3 vertex_uv;
|
||||
layout(location = 3) in lowp vec3 vertex_texcoord0;
|
||||
|
||||
#if BONE_COUNT > 0
|
||||
layout(location = 4) in lowp vec3 vertex_uv;
|
||||
layout(location = 4) in lowp vec3 vertex_texcoord0;
|
||||
layout(location = 5) in highp vec4 bone_weights;
|
||||
layout(location = 6) in highp vec4 bone_indexes;
|
||||
#else
|
||||
@@ -60,7 +60,7 @@ layout(location = 3) in lowp vec3 vertex_uv;
|
||||
#endif
|
||||
#else
|
||||
#if HAS_LIGHT_MAP == 1
|
||||
layout(loction = 7) in mediump vec2 vertex_lightmap_uv;
|
||||
layout(loction = 7) in mediump vec2 vertex_texcoord1;
|
||||
#endif //HAS_LIGHT_MAP
|
||||
#endif // GBUFFER_PASS
|
||||
|
||||
@@ -357,7 +357,7 @@ void main()
|
||||
|
||||
#if HAS_DIFFUSE_MAP == 1 || (HAS_NORMAL_MAP == 1 && ENABLE_PER_PIXEL == 1) || (HAS_SPEC_MAP == 1 && ENABLE_PER_PIXEL == 1) || (HAS_REFLECTION_MAP == 1 && ENABLE_PER_PIXEL == 1)
|
||||
// Pass UV co-ordinates
|
||||
texCoord = vertex_uv.st;
|
||||
texCoord = vertex_texcoord0.st;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -421,7 +421,7 @@ void main()
|
||||
|
||||
#if HAS_LIGHT_MAP == 1
|
||||
// Pass shadow UV co-ordinates
|
||||
lightmap_uv = vertex_lightmap_uv.st;
|
||||
lightmap_uv = vertex_texcoord1.st;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
//
|
||||
|
||||
in vec4 vertex_position;
|
||||
in vec4 vertex_uv;
|
||||
in vec4 vertex_texcoord0;
|
||||
|
||||
out vec2 textureCoordinate;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vertex_position;
|
||||
textureCoordinate = vertex_uv.xy;
|
||||
textureCoordinate = vertex_texcoord0.xy;
|
||||
}
|
||||
@@ -38,10 +38,10 @@ layout (std140, binding = 0) uniform buf {
|
||||
mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices
|
||||
} ubuf;
|
||||
layout (location = 0) in vec4 vertex_position;
|
||||
layout (location = 1) in vec2 vertex_uv;
|
||||
layout (location = 1) in vec2 vertex_texcoord0;
|
||||
layout (location = 0) out vec2 textureCoordinate;
|
||||
|
||||
void main() {
|
||||
textureCoordinate = vertex_uv;
|
||||
textureCoordinate = vertex_texcoord0;
|
||||
gl_Position = ubuf.mvp_matrix * vertex_position;
|
||||
}
|
||||
|
||||
@@ -38,10 +38,10 @@ layout (std140, binding = 0) uniform buf {
|
||||
mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices
|
||||
vec4 viewport;
|
||||
} ubuf;
|
||||
layout (location = 0) in vec2 vertex_uv;
|
||||
layout (location = 0) in vec2 vertex_texcoord0;
|
||||
layout (location = 0) out vec2 textureCoordinate;
|
||||
|
||||
void main() {
|
||||
textureCoordinate = vertex_uv;
|
||||
gl_Position = ubuf.mvp_matrix * vec4(vertex_uv.x * 2.0 - 1.0, vertex_uv.y * 2.0 - 1.0, 0.0, 1.0);
|
||||
textureCoordinate = vertex_texcoord0;
|
||||
gl_Position = ubuf.mvp_matrix * vec4(vertex_texcoord0.x * 2.0 - 1.0, vertex_texcoord0.y * 2.0 - 1.0, 0.0, 1.0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user