mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 21:30:05 +00:00
Placefile polygon looping
This commit is contained in:
parent
e5d18ecc4d
commit
1a4b064214
4 changed files with 82 additions and 30 deletions
|
|
@ -4,12 +4,14 @@ layout (triangles) in;
|
|||
layout (triangle_strip, max_vertices = 3) out;
|
||||
|
||||
uniform float uMapDistance;
|
||||
uniform int uSelectedTime;
|
||||
|
||||
in VertexData
|
||||
{
|
||||
int threshold;
|
||||
vec3 texCoord;
|
||||
vec4 color;
|
||||
int threshold;
|
||||
vec3 texCoord;
|
||||
vec4 color;
|
||||
ivec2 timeRange;
|
||||
} gsIn[];
|
||||
|
||||
smooth out vec3 texCoord;
|
||||
|
|
@ -17,9 +19,12 @@ smooth out vec4 color;
|
|||
|
||||
void main()
|
||||
{
|
||||
if (gsIn[0].threshold <= 0 || // If Threshold: 0 was specified, no threshold
|
||||
gsIn[0].threshold >= uMapDistance || // If Threshold is above current map distance
|
||||
gsIn[0].threshold >= 999) // If Threshold: 999 was specified (or greater), no threshold
|
||||
if ((gsIn[0].threshold <= 0 || // If Threshold: 0 was specified, no threshold
|
||||
gsIn[0].threshold >= uMapDistance || // If Threshold is above current map distance
|
||||
gsIn[0].threshold >= 999) && // If Threshold: 999 was specified (or greater), no threshold
|
||||
(gsIn[0].timeRange[0] == 0 || // If there is no start time specified
|
||||
(gsIn[0].timeRange[0] <= uSelectedTime && // If the selected time is after the start time
|
||||
uSelectedTime < gsIn[0].timeRange[1]))) // If the selected time is before the end time
|
||||
{
|
||||
gl_Position = gl_in[0].gl_Position;
|
||||
texCoord = gsIn[0].texCoord;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue