init
This commit is contained in:
commit
444f800536
122 changed files with 17137 additions and 0 deletions
28
data/shaders/gltf/inputs.vert
Normal file
28
data/shaders/gltf/inputs.vert
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#include <data/shaders/gltf/common.sp>
|
||||
|
||||
layout (location = 0) in vec3 pos;
|
||||
layout (location = 1) in vec3 normal;
|
||||
layout (location = 2) in vec4 color;
|
||||
layout (location = 3) in vec2 uv0;
|
||||
layout (location = 4) in vec2 uv1;
|
||||
|
||||
vec3 getPosition() {
|
||||
return pos;
|
||||
}
|
||||
|
||||
vec3 getNormal() {
|
||||
return normal;
|
||||
}
|
||||
|
||||
vec4 getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
vec2 getTexCoord(uint i) {
|
||||
return i == 0 ? uv0 : uv1;
|
||||
}
|
||||
|
||||
mat4 getModel() {
|
||||
uint mtxId = perFrame.transforms.transforms[gl_BaseInstance].mtxId;
|
||||
return perFrame.drawable.model * perFrame.matrices.matrix[mtxId];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue