Set minimum and maximum size for window and use better line terminators

This commit is contained in:
azraptor
2025-04-11 14:48:50 -04:00
parent 270132a58e
commit 8a3385b15c
4 changed files with 263 additions and 257 deletions

View File

@@ -1,13 +1,13 @@
#version 450
// layout(location = 0) in vec4 in_var_TEXCOORD0;
// layout(location = 0) out vec4 out_var_SV_Target0;
layout(location = 0) in vec4 inColor;
layout(location = 0) out vec4 outColor;
void main()
{
outColor = inColor;
}
#version 450
// layout(location = 0) in vec4 in_var_TEXCOORD0;
// layout(location = 0) out vec4 out_var_SV_Target0;
layout(location = 0) in vec4 inColor;
layout(location = 0) out vec4 outColor;
void main()
{
outColor = inColor;
}

View File

@@ -1,42 +1,42 @@
#version 450
vec2 temp_pos;
vec4 temp_color;
// layout(location = 0) out vec4 out_var_TEXCOORD0;
layout(location = 0) out vec4 outColor;
void main()
{
vec4 color;
vec2 pos;
if (uint(gl_VertexIndex) == 0u)
{
color = vec4(1.0, 0.0, 0.0, 1.0);
pos = vec2(-0.5);
}
else
{
vec4 vert_color;
vec2 vert_pos;
if (uint(gl_VertexIndex) == 1u)
{
vert_color = vec4(0.0, 1.0, 0.0, 1.0);
vert_pos = vec2(0.5, -0.5);
}
else
{
bool index_exists = uint(gl_VertexIndex) == 2u;
vert_color = mix(temp_color, vec4(0.0, 0.0, 1.0, 1.0), bvec4(index_exists));
vert_pos = mix(temp_pos, vec2(0.0, 0.5), bvec2(index_exists));
}
color = vert_color;
pos = vert_pos;
}
// out_var_TEXCOORD0 = color;
outColor = color;
gl_Position = vec4(pos, 0.0, 1.0);
}
#version 450
vec2 temp_pos;
vec4 temp_color;
// layout(location = 0) out vec4 out_var_TEXCOORD0;
layout(location = 0) out vec4 outColor;
void main()
{
vec4 color;
vec2 pos;
if (uint(gl_VertexIndex) == 0u)
{
color = vec4(1.0, 0.0, 0.0, 1.0);
pos = vec2(-0.5);
}
else
{
vec4 vert_color;
vec2 vert_pos;
if (uint(gl_VertexIndex) == 1u)
{
vert_color = vec4(0.0, 1.0, 0.0, 1.0);
vert_pos = vec2(0.5, -0.5);
}
else
{
bool index_exists = uint(gl_VertexIndex) == 2u;
vert_color = mix(temp_color, vec4(0.0, 0.0, 1.0, 1.0), bvec4(index_exists));
vert_pos = mix(temp_pos, vec2(0.0, 0.5), bvec2(index_exists));
}
color = vert_color;
pos = vert_pos;
}
// out_var_TEXCOORD0 = color;
outColor = color;
gl_Position = vec4(pos, 0.0, 1.0);
}