Add Offscreen Framebuffer support

This commit is contained in:
Thraix
2023-02-05 01:04:07 +01:00
parent 9de2ff594b
commit 708b81c571
25 changed files with 597 additions and 219 deletions
+9 -9
View File
@@ -2,10 +2,10 @@
layout(set = 0, binding = 0) uniform SceneUniformBufferObject
{
mat4 projection;
mat4 view;
mat4 model;
vec3 lightPos;
mat4 projection;
mat4 view;
mat4 model;
vec3 lightPos;
} ubo;
layout(location = 0) in vec3 inPosition;
@@ -18,9 +18,9 @@ layout(location = 2) out vec3 fragPosition;
layout(location = 3) out vec3 fragLightPos;
void main() {
gl_Position = ubo.projection * ubo.view * ubo.model * vec4(inPosition, 1.0);
fragColor = inColor;
fragTexCoord = inTexCoord;
fragPosition = vec3(ubo.model * vec4(inPosition, 1.0));
fragLightPos = ubo.lightPos;
gl_Position = ubo.projection * ubo.view * ubo.model * vec4(inPosition, 1.0);
fragColor = inColor;
fragTexCoord = inTexCoord;
fragPosition = vec3(ubo.model * vec4(inPosition, 1.0));
fragLightPos = ubo.lightPos;
}