diff --git a/Assets/Materials/AnimatedRaccoon.shmat b/Assets/Materials/AnimatedRaccoon.shmat new file mode 100644 index 00000000..ae7c7163 --- /dev/null +++ b/Assets/Materials/AnimatedRaccoon.shmat @@ -0,0 +1,8 @@ +- VertexShader: 47911992 + FragmentShader: 46377769 + SubPass: G-Buffer Write + Properties: + data.color: {x: 1, y: 1, z: 1, w: 1} + data.textureIndex: 0 + data.alpha: 0 + data.beta: {x: 1, y: 1, z: 1} \ No newline at end of file diff --git a/Assets/Materials/AnimatedRaccoon.shmat.shmeta b/Assets/Materials/AnimatedRaccoon.shmat.shmeta new file mode 100644 index 00000000..39700e98 --- /dev/null +++ b/Assets/Materials/AnimatedRaccoon.shmat.shmeta @@ -0,0 +1,3 @@ +Name: AnimatedRaccoon +ID: 128805346 +Type: 7 diff --git a/Assets/Shaders/DefaultSkinned_VS.glsl b/Assets/Shaders/DefaultSkinned_VS.glsl deleted file mode 100644 index 22199ff5..00000000 --- a/Assets/Shaders/DefaultSkinned_VS.glsl +++ /dev/null @@ -1,65 +0,0 @@ -#version 450 -#extension GL_KHR_vulkan_glsl : enable - -//#include "ShaderDescriptorDefinitions.glsl" - - -layout(location = 0) in vec3 aVertexPos; -layout(location = 1) in vec2 aUV; -layout(location = 2) in vec3 aNormal; -layout(location = 3) in vec3 aTangent; -layout(location = 4) in mat4 worldTransform; -layout(location = 5) in ivec4 aBoneIndices; -layout(location = 6) in vec4 aBoneWeights; -layout(location = 8) in uvec2 integerData; - - -layout(location = 0) out struct -{ - vec4 vertPos; // location 0 - vec2 uv; // location = 1 - vec4 normal; // location = 2 - -} Out; - -// material stuff -layout(location = 3) out struct -{ - int materialIndex; - uint eid; - uint lightLayerIndex; - -} Out2; - -layout(set = 2, binding = 0) uniform CameraData -{ - vec4 position; - mat4 vpMat; - mat4 viewMat; - mat4 projMat; -} cameraData; - -void main() -{ - Out2.materialIndex = gl_InstanceIndex; - Out2.eid = integerData[0]; - Out2.lightLayerIndex = integerData[1]; - - // for transforming gBuffer position and normal data - mat4 modelViewMat = cameraData.viewMat * worldTransform; - - // gBuffer position will be in view space - Out.vertPos = modelViewMat * vec4(aVertexPos, 1.0f); - - // uvs for texturing in fragment shader - Out.uv = aUV; - - mat3 transposeInv = mat3 (transpose(inverse(modelViewMat))); - - // normals are also in view space - Out.normal.rgb = transposeInv * aNormal.rgb; - Out.normal.rgb = normalize (Out.normal.rgb); - - // clip space for rendering - gl_Position = cameraData.vpMat * worldTransform * vec4 (aVertexPos, 1.0f); -} \ No newline at end of file