Added new sample to demonstrate negative viewport height via VK_KHR_MAINTENANCE1
Refs #563
This commit is contained in:
parent
35ff87a7e3
commit
358ab9d550
6 changed files with 336 additions and 0 deletions
12
data/shaders/negativeviewportheight/quad.frag
Normal file
12
data/shaders/negativeviewportheight/quad.frag
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#version 450
|
||||
|
||||
layout (binding = 0) uniform sampler2D samplerColor;
|
||||
|
||||
layout (location = 0) in vec2 inUV;
|
||||
layout (location = 0) out vec4 outColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
outColor = texture(samplerColor, inUV);
|
||||
outColor.rgb *= vec3(inUV, 0.0f);
|
||||
}
|
||||
BIN
data/shaders/negativeviewportheight/quad.frag.spv
Normal file
BIN
data/shaders/negativeviewportheight/quad.frag.spv
Normal file
Binary file not shown.
14
data/shaders/negativeviewportheight/quad.vert
Normal file
14
data/shaders/negativeviewportheight/quad.vert
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#version 450
|
||||
|
||||
layout (location = 0) in vec3 inPos;
|
||||
layout (location = 1) in vec2 inUV;
|
||||
|
||||
layout (location = 0) out vec2 outUV;
|
||||
|
||||
void main()
|
||||
{
|
||||
// outUV = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);
|
||||
// gl_Position = vec4(outUV * 2.0f - 1.0f, 0.0f, 1.0f);
|
||||
outUV = inUV;
|
||||
gl_Position = vec4(inPos, 1.0f);
|
||||
}
|
||||
BIN
data/shaders/negativeviewportheight/quad.vert.spv
Normal file
BIN
data/shaders/negativeviewportheight/quad.vert.spv
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue