Moved from material abstraction to pipeline abstraction, need to implement bindless textures\n

main
noah metz 2024-01-13 12:32:17 -07:00
parent e1cde5c8bb
commit 91731d933d
4 changed files with 289 additions and 527 deletions

@ -3,7 +3,6 @@
layout( push_constant ) uniform constants { layout( push_constant ) uniform constants {
mat4 view; mat4 view;
mat4 proj; mat4 proj;
mat4 model;
} scene; } scene;
layout(set = 0, binding = 0) uniform SceneUniform { layout(set = 0, binding = 0) uniform SceneUniform {
@ -16,6 +15,6 @@ layout(location = 1) in vec3 inColor;
layout(location = 0) out vec3 fragColor; layout(location = 0) out vec3 fragColor;
void main() { void main() {
gl_Position = scene.proj * scene.view * scene.model * vec4(inPosition, 1.0); gl_Position = scene.proj * scene.view * vec4(inPosition, 1.0);
fragColor = inColor; fragColor = inColor;
} }

@ -1,12 +1,10 @@
#version 450 #version 450
layout(set = 2, binding = 0) uniform sampler2D texSampler;
layout(location = 0) in vec3 fragColor; layout(location = 0) in vec3 fragColor;
layout(location = 1) in vec2 fragTex; layout(location = 1) in vec2 fragTex;
layout(location = 0) out vec4 outColor; layout(location = 0) out vec4 outColor;
void main() { void main() {
outColor = texture(texSampler, fragTex); outColor = vec4(fragTex, 1.0, 1.0);
} }

@ -3,7 +3,6 @@
layout( push_constant ) uniform constants { layout( push_constant ) uniform constants {
mat4 view; mat4 view;
mat4 proj; mat4 proj;
mat4 model;
} scene_pc; } scene_pc;
layout(set = 0, binding = 0) uniform SceneUniformBuffer { layout(set = 0, binding = 0) uniform SceneUniformBuffer {
@ -18,7 +17,7 @@ layout(location = 0) out vec3 fragColor;
layout(location = 1) out vec2 fragTex; layout(location = 1) out vec2 fragTex;
void main() { void main() {
gl_Position = scene_pc.proj * scene_pc.view * scene_pc.model * vec4(inPosition, 1.0); gl_Position = scene_pc.proj * scene_pc.view * vec4(inPosition, 1.0);
fragColor = inColor; fragColor = inColor;
fragTex = inTex; fragTex = inTex;
} }

File diff suppressed because it is too large Load Diff