From 4899815c69894bba3eb1a6faa8ccbbc676751728 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Mon, 2 Oct 2023 19:51:10 -0400 Subject: instancing now works as intended --- assets/models/torus.png | Bin 325509 -> 340857 bytes assets/shaders/vert.vert | 11 ++--------- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'assets') diff --git a/assets/models/torus.png b/assets/models/torus.png index dc3f10f..5955502 100644 Binary files a/assets/models/torus.png and b/assets/models/torus.png differ diff --git a/assets/shaders/vert.vert b/assets/shaders/vert.vert index 593e88c..57fa219 100644 --- a/assets/shaders/vert.vert +++ b/assets/shaders/vert.vert @@ -13,10 +13,7 @@ layout(location = 1) in vec3 inNorm; layout(location = 2) in vec2 inUV; // instance -layout(location = 3) in vec3 instPos; -layout(location = 4) in vec3 instRot; -layout(location = 5) in vec3 instScale; -// layout(location = 6) in float textureIndex; +layout(location = 3) in mat4 instPosRotScale; // output layout(location = 0) out vec4 fragColor; @@ -27,12 +24,8 @@ void main() { ubo.proj * ubo.view * ubo.model * + instPosRotScale * vec4(inPosition, 1.0); -/* - vec4(instPos, 1.0) * - vec4(instRot, 1.0) * - vec4(instScale, 1.0) * -*/ fragColor = vec4(0.0, 0.0, 0.0, 0.0); fragTexCoord = vec3(inUV, 0); } -- cgit v1.2.3