mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 07:12:36 +00:00
- this still doesn't work on Vulkan. :(
This commit is contained in:
parent
dd5de4ce51
commit
7c46dace03
3 changed files with 7 additions and 4 deletions
|
@ -271,7 +271,7 @@ const FDefaultShader defaultshaders[] =
|
||||||
{"Specular", "shaders/glsl/func_spec.fp", "shaders/glsl/material_specular.fp", "#define SPECULAR\n#define NORMALMAP\n"},
|
{"Specular", "shaders/glsl/func_spec.fp", "shaders/glsl/material_specular.fp", "#define SPECULAR\n#define NORMALMAP\n"},
|
||||||
{"PBR","shaders/glsl/func_pbr.fp", "shaders/glsl/material_pbr.fp", "#define PBR\n#define NORMALMAP\n"},
|
{"PBR","shaders/glsl/func_pbr.fp", "shaders/glsl/material_pbr.fp", "#define PBR\n#define NORMALMAP\n"},
|
||||||
{"Paletted", "shaders/glsl/func_paletted.fp", "shaders/glsl/material_nolight.fp", ""},
|
{"Paletted", "shaders/glsl/func_paletted.fp", "shaders/glsl/material_nolight.fp", ""},
|
||||||
{"No Texture", "shaders/glsl/func_notexture.fp", "shaders/glsl/material_normal.fp", ""},
|
{"No Texture", "shaders/glsl/func_notexture.fp", "shaders/glsl/material_normal.fp", "#define NO_LAYERS\n"},
|
||||||
{"Basic Fuzz", "shaders/glsl/fuzz_standard.fp", "shaders/glsl/material_normal.fp", ""},
|
{"Basic Fuzz", "shaders/glsl/fuzz_standard.fp", "shaders/glsl/material_normal.fp", ""},
|
||||||
{"Smooth Fuzz", "shaders/glsl/fuzz_smooth.fp", "shaders/glsl/material_normal.fp", ""},
|
{"Smooth Fuzz", "shaders/glsl/fuzz_smooth.fp", "shaders/glsl/material_normal.fp", ""},
|
||||||
{"Swirly Fuzz", "shaders/glsl/fuzz_swirly.fp", "shaders/glsl/material_normal.fp", ""},
|
{"Swirly Fuzz", "shaders/glsl/fuzz_swirly.fp", "shaders/glsl/material_normal.fp", ""},
|
||||||
|
|
|
@ -228,7 +228,7 @@ void VkRenderState::ApplyRenderPass(int dt)
|
||||||
pipelineKey.StencilPassOp = mStencilOp;
|
pipelineKey.StencilPassOp = mStencilOp;
|
||||||
pipelineKey.ColorMask = mColorMask;
|
pipelineKey.ColorMask = mColorMask;
|
||||||
pipelineKey.CullMode = mCullMode;
|
pipelineKey.CullMode = mCullMode;
|
||||||
pipelineKey.NumTextureLayers = mMaterial.mMaterial ? mMaterial.mMaterial->GetLayers() : 1; // Always force minimum 1 texture as the shader requires it
|
pipelineKey.NumTextureLayers = mMaterial.mMaterial ? mMaterial.mMaterial->GetLayers() : 4; // Always force minimum 1 texture as the shader requires it
|
||||||
if (mSpecialEffect > EFF_NONE)
|
if (mSpecialEffect > EFF_NONE)
|
||||||
{
|
{
|
||||||
pipelineKey.SpecialEffect = mSpecialEffect;
|
pipelineKey.SpecialEffect = mSpecialEffect;
|
||||||
|
@ -373,7 +373,7 @@ void VkRenderState::ApplyPushConstants()
|
||||||
|
|
||||||
mPushConstants.uFogEnabled = fogset;
|
mPushConstants.uFogEnabled = fogset;
|
||||||
int f = mTextureModeFlags;
|
int f = mTextureModeFlags;
|
||||||
if (!mBrightmapEnabled) f &= TEXF_Detailmap;
|
if (!mBrightmapEnabled)
|
||||||
mPushConstants.uTextureMode = (mTextureMode == TM_NORMAL && tempTM == TM_OPAQUE ? TM_OPAQUE : mTextureMode) | f;
|
mPushConstants.uTextureMode = (mTextureMode == TM_NORMAL && tempTM == TM_OPAQUE ? TM_OPAQUE : mTextureMode) | f;
|
||||||
mPushConstants.uLightDist = mLightParms[0];
|
mPushConstants.uLightDist = mLightParms[0];
|
||||||
mPushConstants.uLightFactor = mLightParms[1];
|
mPushConstants.uLightFactor = mLightParms[1];
|
||||||
|
|
|
@ -543,6 +543,8 @@ void SetMaterialProps(inout Material material, vec2 texCoord)
|
||||||
material.Base = getTexel(texCoord.st);
|
material.Base = getTexel(texCoord.st);
|
||||||
material.Normal = ApplyNormalMap(texCoord.st);
|
material.Normal = ApplyNormalMap(texCoord.st);
|
||||||
|
|
||||||
|
// OpenGL doesn't care, but Vulkan pukes all over the place if these texture samplings are included in no-texture shaders, even though never called.
|
||||||
|
#ifndef NO_LAYERS
|
||||||
if ((uTextureMode & TEXF_Brightmap) != 0)
|
if ((uTextureMode & TEXF_Brightmap) != 0)
|
||||||
material.Bright = texture(brighttexture, texCoord.st);
|
material.Bright = texture(brighttexture, texCoord.st);
|
||||||
|
|
||||||
|
@ -554,6 +556,7 @@ void SetMaterialProps(inout Material material, vec2 texCoord)
|
||||||
|
|
||||||
if ((uTextureMode & TEXF_Glowmap) != 0)
|
if ((uTextureMode & TEXF_Glowmap) != 0)
|
||||||
material.Glow = texture(glowtexture, texCoord.st);
|
material.Glow = texture(glowtexture, texCoord.st);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
Loading…
Reference in a new issue