Have 100 cubes flying around in a circle with refraction.
This commit is contained in:
parent
1107c86036
commit
a199d41890
7 changed files with 29 additions and 15 deletions
|
|
@ -16,12 +16,7 @@ uniform vec3 offsets[10];
|
|||
|
||||
void main()
|
||||
{
|
||||
// THIS WORKS
|
||||
// vec3 in_offset = offsets[gl_InstanceID];
|
||||
|
||||
// THIS DOES NOT, see Scene::setup_instancing and Mesh::draw
|
||||
vec3 in_offset = aOffset;
|
||||
// in_offset.x = gl_InstanceID;
|
||||
|
||||
vec4 offset = vec4(aPos + in_offset, 1.0);
|
||||
gl_Position = projection * view * model * offset;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue