update DrawRect2D shaders
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#version 450 core
|
||||
|
||||
layout(location = 0) in vec4 Vertex;
|
||||
layout(location = 1) in vec4 TexCoord;
|
||||
|
||||
layout(binding=0) uniform WorldMatrix // hgl/math/Math.h
|
||||
{
|
||||
@@ -20,6 +21,8 @@ layout(binding=0) uniform WorldMatrix // hgl/math/Math.h
|
||||
vec2 viewport_resolution;
|
||||
}world;
|
||||
|
||||
layout(location=0) out vec4 GeometryTexCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 lt=vec4(Vertex.xy,vec2(0,1));
|
||||
@@ -28,5 +31,7 @@ void main()
|
||||
vec4 lt_fin=lt*world.ortho;
|
||||
vec4 rb_fin=rb*world.ortho;
|
||||
|
||||
GeometryTexCoord=TexCoord;
|
||||
|
||||
gl_Position=vec4(lt_fin.xy,rb_fin.xy);
|
||||
}
|
||||
|
Reference in New Issue
Block a user