mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 07:11:41 +00:00
[vulkan] Clean up lighting shaders a little
Having more than one copy of ShadowMatrices went against my plans, and I had trouble finding the attachments set (light_attach.h wasn't such a good idea).
This commit is contained in:
parent
618740663b
commit
a3e99435df
8 changed files with 15 additions and 18 deletions
|
@ -332,7 +332,6 @@ debug_src = $(vkshaderpath)/debug.frag
|
|||
debug_c = $(vkshaderpath)/debug.frag.spvc
|
||||
entid_src = $(vkshaderpath)/entid.frag
|
||||
entid_c = $(vkshaderpath)/entid.frag.spvc
|
||||
light_attach_h = $(vkshaderpath)/light_attach.h
|
||||
light_entid_src = $(vkshaderpath)/light_entid.vert
|
||||
light_entid_c = $(vkshaderpath)/light_entid.vert.spvc
|
||||
light_flat_src = $(vkshaderpath)/light_flat.vert
|
||||
|
@ -453,13 +452,13 @@ $(light_splatf_c): $(light_splatf_src) $(lighting_h)
|
|||
|
||||
$(light_debug_c): $(light_debug_src) $(lighting_h)
|
||||
|
||||
$(lighting_nonef_c): $(lighting_nonef_src) $(lighting_h) $(light_attach_h) $(lighting_main)
|
||||
$(lighting_nonef_c): $(lighting_nonef_src) $(lighting_h) $(lighting_main)
|
||||
|
||||
$(lighting_cascadef_c): $(lighting_cascadef_src) $(lighting_h) $(light_attach_h) $(lighting_main)
|
||||
$(lighting_cascadef_c): $(lighting_cascadef_src) $(lighting_h) $(lighting_main)
|
||||
|
||||
$(lighting_cubef_c): $(lighting_cubef_src) $(lighting_h) $(light_attach_h) $(lighting_main)
|
||||
$(lighting_cubef_c): $(lighting_cubef_src) $(lighting_h) $(lighting_main)
|
||||
|
||||
$(lighting_planef_c): $(lighting_planef_src) $(lighting_h) $(light_attach_h) $(lighting_main)
|
||||
$(lighting_planef_c): $(lighting_planef_src) $(lighting_h) $(lighting_main)
|
||||
|
||||
$(composef_c): $(composef_src) $(oit_blend) $(oit_h)
|
||||
|
||||
|
@ -619,7 +618,6 @@ EXTRA_DIST += \
|
|||
$(bsp_turbf_src) \
|
||||
$(debug_src) \
|
||||
$(entid_src) \
|
||||
$(light_attach_h) \
|
||||
$(light_entid_src) \
|
||||
$(light_flat_src) \
|
||||
$(light_splatv_src) \
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
layout (input_attachment_index = 0, set = 2, binding = 0) uniform subpassInput color;
|
||||
layout (input_attachment_index = 1, set = 2, binding = 1) uniform subpassInput emission;
|
||||
layout (input_attachment_index = 2, set = 2, binding = 2) uniform subpassInput normal;
|
||||
layout (input_attachment_index = 3, set = 2, binding = 3) uniform subpassInput position;
|
|
@ -15,6 +15,9 @@ struct LightRender {
|
|||
uint style;
|
||||
};
|
||||
|
||||
layout (set = 0, binding = 0) buffer ShadowMatrices {
|
||||
mat4 shadow_mats[];
|
||||
};
|
||||
layout (set = 1, binding = 0) buffer LightIds {
|
||||
uint lightIds[];
|
||||
};
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#version 450
|
||||
#extension GL_GOOGLE_include_directive : enable
|
||||
#include "lighting.h"
|
||||
|
||||
layout (set = 3, binding = 0) uniform sampler2DArrayShadow shadow_map[32];
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#version 450
|
||||
#extension GL_GOOGLE_include_directive : enable
|
||||
#include "lighting.h"
|
||||
|
||||
layout (set = 0, binding = 0) buffer ShadowMatrices {
|
||||
mat4 shadow_mats[];
|
||||
};
|
||||
layout (set = 3, binding = 0) uniform samplerCubeArrayShadow shadow_map[32];
|
||||
|
||||
float
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "lighting.h"
|
||||
#include "light_attach.h"
|
||||
layout (input_attachment_index = 0, set = 2, binding = 0) uniform subpassInput color;
|
||||
layout (input_attachment_index = 1, set = 2, binding = 1) uniform subpassInput emission;
|
||||
layout (input_attachment_index = 2, set = 2, binding = 2) uniform subpassInput normal;
|
||||
layout (input_attachment_index = 3, set = 2, binding = 3) uniform subpassInput position;
|
||||
|
||||
layout (location = 0) out vec4 frag_color;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#version 450
|
||||
#extension GL_GOOGLE_include_directive : enable
|
||||
#include "lighting.h"
|
||||
|
||||
float
|
||||
shadow (uint mapid, uint layer, uint mat_id, vec3 pos, vec3 lpos)
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#version 450
|
||||
#extension GL_GOOGLE_include_directive : enable
|
||||
#include "lighting.h"
|
||||
|
||||
layout (set = 0, binding = 0) buffer ShadowMatrices {
|
||||
mat4 shadow_mats[];
|
||||
};
|
||||
layout (set = 3, binding = 0) uniform sampler2DArrayShadow shadow_map[32];
|
||||
|
||||
float
|
||||
|
|
Loading…
Reference in a new issue