git.ucc.asn.au
/
ipdf
/
code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Béziers on the GPU.
[ipdf/code.git]
/
src
/
shaders
/
rect_vert.glsl
diff --git
a/src/shaders/rect_vert.glsl
b/src/shaders/rect_vert.glsl
index
cc15e56
..
a9f258a
100644
(file)
--- a/
src/shaders/rect_vert.glsl
+++ b/
src/shaders/rect_vert.glsl
@@
-12,6
+12,8
@@
layout(std140, binding=0) uniform ViewBounds
layout(location = 0) in vec2 position;
layout(location = 0) in vec2 position;
+out int objectid;
+
void main()
{
vec2 transformed_position;
void main()
{
vec2 transformed_position;
@@
-22,4
+24,6
@@
void main()
gl_Position.y = 1 - (transformed_position.y*2);
gl_Position.z = 0.0;
gl_Position.w = 1.0;
gl_Position.y = 1 - (transformed_position.y*2);
gl_Position.z = 0.0;
gl_Position.w = 1.0;
+
+ objectid = gl_VertexID / 2;
}
}
UCC
git Repository :: git.ucc.asn.au