- add render pass manager and setup a pipeline for VkRenderState
This commit is contained in:
parent
fbfcc30d00
commit
9ed1c7f40b
15 changed files with 360 additions and 87 deletions
|
|
@ -48,19 +48,24 @@ static const char *shaderBindings = R"(
|
|||
|
||||
// textures
|
||||
layout(set = 1, binding = 0) uniform sampler2D tex;
|
||||
layout(set = 1, binding = 1) uniform sampler2D texture2;
|
||||
layout(set = 1, binding = 2) uniform sampler2D texture3;
|
||||
layout(set = 1, binding = 3) uniform sampler2D texture4;
|
||||
layout(set = 1, binding = 4) uniform sampler2D texture5;
|
||||
layout(set = 1, binding = 5) uniform sampler2D texture6;
|
||||
layout(set = 1, binding = 16) uniform sampler2D ShadowMap;
|
||||
// layout(set = 1, binding = 1) uniform sampler2D texture2;
|
||||
// layout(set = 1, binding = 2) uniform sampler2D texture3;
|
||||
// layout(set = 1, binding = 3) uniform sampler2D texture4;
|
||||
// layout(set = 1, binding = 4) uniform sampler2D texture5;
|
||||
// layout(set = 1, binding = 5) uniform sampler2D texture6;
|
||||
// layout(set = 1, binding = 16) uniform sampler2D ShadowMap;
|
||||
|
||||
// This must match the PushConstants struct
|
||||
layout(push_constant, std140) uniform PushConstants
|
||||
{
|
||||
// matrices
|
||||
mat4 ModelMatrix;
|
||||
mat4 NormalModelMatrix;
|
||||
mat4 TextureMatrix;
|
||||
|
||||
int uTextureMode;
|
||||
vec2 uClipSplit;
|
||||
float uAlphaThreshold;
|
||||
vec2 uClipSplit;
|
||||
|
||||
// colors
|
||||
vec4 uObjectColor;
|
||||
|
|
@ -70,6 +75,7 @@ static const char *shaderBindings = R"(
|
|||
vec4 uFogColor;
|
||||
float uDesaturationFactor;
|
||||
float uInterpolationFactor;
|
||||
float padding0, padding1;
|
||||
|
||||
// Glowing walls stuff
|
||||
vec4 uGlowTopPlane;
|
||||
|
|
@ -95,11 +101,6 @@ static const char *shaderBindings = R"(
|
|||
|
||||
// Blinn glossiness and specular level
|
||||
vec2 uSpecularMaterial;
|
||||
|
||||
// matrices
|
||||
mat4 ModelMatrix;
|
||||
mat4 NormalModelMatrix;
|
||||
mat4 TextureMatrix;
|
||||
};
|
||||
|
||||
// material types
|
||||
|
|
@ -117,10 +118,9 @@ static const char *shaderBindings = R"(
|
|||
#define brighttexture texture2
|
||||
#endif
|
||||
|
||||
#define SUPPORTS_SHADOWMAPS
|
||||
// #define SUPPORTS_SHADOWMAPS
|
||||
)";
|
||||
|
||||
|
||||
std::unique_ptr<VulkanShader> VkShaderManager::LoadVertShader(const char *vert_lump, const char *defines)
|
||||
{
|
||||
FString code = GetTargetGlslVersion();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue