diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2023-10-02 19:51:10 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2023-10-02 19:51:10 -0400 |
| commit | 4899815c69894bba3eb1a6faa8ccbbc676751728 (patch) | |
| tree | e3d5895b35d060d193ec59ccdeaf65dfbad6e145 /assets | |
| parent | 2bdee2ce549b1306cafb1d657624eeed4cf7225a (diff) | |
instancing now works as intended
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/models/torus.png | bin | 325509 -> 340857 bytes | |||
| -rw-r--r-- | assets/shaders/vert.vert | 11 |
2 files changed, 2 insertions, 9 deletions
diff --git a/assets/models/torus.png b/assets/models/torus.png Binary files differindex dc3f10f..5955502 100644 --- a/assets/models/torus.png +++ b/assets/models/torus.png 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); } |
