mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
Fix vertex layout locations and add lightmap to vulkan shader
This commit is contained in:
parent
934b5af975
commit
604c4ff8e0
3 changed files with 4 additions and 6 deletions
|
@ -172,6 +172,7 @@ static const char *shaderBindings = R"(
|
|||
};
|
||||
|
||||
layout(set = 0, binding = 4) uniform sampler2D ShadowMap;
|
||||
layout(set = 0, binding = 5) uniform sampler2DArray LightMap;
|
||||
|
||||
// textures
|
||||
layout(set = 1, binding = 0) uniform sampler2D tex;
|
||||
|
|
|
@ -7,12 +7,11 @@ layout(location = 3) in vec3 glowdist;
|
|||
layout(location = 4) in vec3 gradientdist;
|
||||
layout(location = 5) in vec4 vWorldNormal;
|
||||
layout(location = 6) in vec4 vEyeNormal;
|
||||
layout(location = 7) in vec3 vLightmap;
|
||||
layout(location = 9) in vec3 vLightmap;
|
||||
|
||||
#ifdef NO_CLIPDISTANCE_SUPPORT
|
||||
layout(location = 7) in vec4 ClipDistanceA;
|
||||
layout(location = 8) in vec4 ClipDistanceB;
|
||||
layout(location = 9) in vec3 vLightmap;
|
||||
#endif
|
||||
|
||||
layout(location=0) out vec4 FragColor;
|
||||
|
|
|
@ -5,26 +5,24 @@ layout(location = 2) in vec4 aColor;
|
|||
|
||||
layout(location = 0) out vec4 vTexCoord;
|
||||
layout(location = 1) out vec4 vColor;
|
||||
layout(location = 2) out vec3 vLightmap;
|
||||
layout(location = 9) out vec3 vLightmap;
|
||||
|
||||
#ifndef SIMPLE // we do not need these for simple shaders
|
||||
layout(location = 3) in vec4 aVertex2;
|
||||
layout(location = 4) in vec4 aNormal;
|
||||
layout(location = 5) in vec4 aNormal2;
|
||||
layout(location = 6) in vec3 aLightmap;
|
||||
|
||||
layout(location = 2) out vec4 pixelpos;
|
||||
layout(location = 3) out vec3 glowdist;
|
||||
layout(location = 4) out vec3 gradientdist;
|
||||
layout(location = 5) out vec4 vWorldNormal;
|
||||
layout(location = 6) out vec4 vEyeNormal;
|
||||
|
||||
layout(location = 7) in vec3 aLightmap;
|
||||
#endif
|
||||
|
||||
#ifdef NO_CLIPDISTANCE_SUPPORT
|
||||
layout(location = 7) out vec4 ClipDistanceA;
|
||||
layout(location = 8) out vec4 ClipDistanceB;
|
||||
layout(location = 9) in vec3 aLightmap;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
|
|
Loading…
Reference in a new issue