From f9ad6fa902c1167d7622ee7af2617d14b62bee21 Mon Sep 17 00:00:00 2001 From: pryazha Date: Wed, 19 Feb 2025 22:26:48 +0500 Subject: quite a lot of changes that I, of course, are not going to describe;) --- advanced_opengl/9.instancing/shaders/instanced_arrays.vert | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 advanced_opengl/9.instancing/shaders/instanced_arrays.vert (limited to 'advanced_opengl/9.instancing/shaders/instanced_arrays.vert') diff --git a/advanced_opengl/9.instancing/shaders/instanced_arrays.vert b/advanced_opengl/9.instancing/shaders/instanced_arrays.vert new file mode 100644 index 0000000..ce3ea7d --- /dev/null +++ b/advanced_opengl/9.instancing/shaders/instanced_arrays.vert @@ -0,0 +1,13 @@ +#version 330 core +layout(location = 0) in vec2 apos; +layout(location = 1) in vec3 acolor; +layout(location = 2) in vec2 aoffset; + +out vec3 color; + +void main(void) +{ + color = acolor; + vec2 pos = apos*(gl_InstanceID/100.0); + gl_Position = vec4(pos+aoffset, 0.0, 1.0); +} -- cgit v1.2.3