Add tests for legacy I/O flattening.
This commit is contained in:
parent
c5de1cfa90
commit
fd12124bf7
12
reference/shaders/legacy/fragment/io-blocks.legacy.frag
Normal file
12
reference/shaders/legacy/fragment/io-blocks.legacy.frag
Normal file
@ -0,0 +1,12 @@
|
||||
#version 100
|
||||
precision mediump float;
|
||||
precision highp int;
|
||||
|
||||
varying vec4 VertexOut_color;
|
||||
varying highp vec3 VertexOut_normal;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragData[0] = VertexOut_color + VertexOut_normal.xyzz;
|
||||
}
|
||||
|
13
reference/shaders/legacy/vert/io-block.legacy.vert
Normal file
13
reference/shaders/legacy/vert/io-block.legacy.vert
Normal file
@ -0,0 +1,13 @@
|
||||
#version 100
|
||||
|
||||
attribute vec4 Position;
|
||||
varying vec4 VertexOut_color;
|
||||
varying vec3 VertexOut_normal;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = Position;
|
||||
VertexOut_color = vec4(1.0);
|
||||
VertexOut_normal = vec3(0.5);
|
||||
}
|
||||
|
16
shaders/legacy/fragment/io-blocks.legacy.frag
Normal file
16
shaders/legacy/fragment/io-blocks.legacy.frag
Normal file
@ -0,0 +1,16 @@
|
||||
#version 310 es
|
||||
#extension GL_EXT_shader_io_blocks : require
|
||||
precision mediump float;
|
||||
|
||||
layout(location = 1) in VertexOut
|
||||
{
|
||||
vec4 color;
|
||||
highp vec3 normal;
|
||||
} vin;
|
||||
|
||||
layout(location = 0) out vec4 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vin.color + vin.normal.xyzz;
|
||||
}
|
17
shaders/legacy/vert/io-block.legacy.vert
Normal file
17
shaders/legacy/vert/io-block.legacy.vert
Normal file
@ -0,0 +1,17 @@
|
||||
#version 310 es
|
||||
#extension GL_EXT_shader_io_blocks : require
|
||||
|
||||
layout(location = 0) out VertexOut
|
||||
{
|
||||
vec4 color;
|
||||
vec3 normal;
|
||||
} vout;
|
||||
|
||||
layout(location = 0) in vec4 Position;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = Position;
|
||||
vout.color = vec4(1.0);
|
||||
vout.normal = vec3(0.5);
|
||||
}
|
Loading…
Reference in New Issue
Block a user