Skip to content

Commit

Permalink
fix: fixes for effect shader; effect shader enabled fully. (#427)
Browse files Browse the repository at this point in the history
Co-authored-by: Ilya Perapechka <i_perapechka@wargaming.net>
  • Loading branch information
Jonahex and Ilya Perapechka authored Aug 18, 2024
1 parent 17013c7 commit 47acdbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
4 changes: 2 additions & 2 deletions package/Shaders/Effect.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ PS_OUTPUT main(PS_INPUT input)
float4 baseColorMul = float4(1, 1, 1, 1);
# else
float4 baseColorMul = BaseColor;
# if defined(VC)
# if defined(VC) && !defined(PROJECTED_UV)
baseColorMul *= input.Color;
# endif
# endif
Expand Down Expand Up @@ -676,7 +676,7 @@ PS_OUTPUT main(PS_INPUT input)
# if defined(MEMBRANE)
grayscaleToColorUv.y = PropertyColor.x;
# endif
baseColor.xyz = BaseColorScale.x * TexGrayscaleSampler.Sample(SampGrayscaleSampler, grayscaleToColorUv).xyz;
baseColor.xyz = baseColorScale * TexGrayscaleSampler.Sample(SampGrayscaleSampler, grayscaleToColorUv).xyz;
}

float3 lightColor = lerp(baseColor.xyz, propertyColor * baseColor.xyz, lightingInfluence.xxx);
Expand Down
14 changes: 0 additions & 14 deletions src/ShaderCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1742,13 +1742,6 @@ namespace SIE
RE::BSGraphics::VertexShader* ShaderCache::GetVertexShader(const RE::BSShader& shader,
uint32_t descriptor)
{
if (shader.shaderType.get() == RE::BSShader::Type::Effect) {
if (descriptor & static_cast<uint32_t>(ShaderCache::EffectShaderFlags::Lighting)) {
} else {
return nullptr;
}
}

if (shader.shaderType == RE::BSShader::Type::ImageSpace) {
const auto& isShader = static_cast<const RE::BSImagespaceShader&>(shader);
if (!SShaderCache::GetImagespaceShaderDescriptor(isShader, descriptor)) {
Expand Down Expand Up @@ -1791,13 +1784,6 @@ namespace SIE
RE::BSGraphics::PixelShader* ShaderCache::GetPixelShader(const RE::BSShader& shader,
uint32_t descriptor)
{
if (shader.shaderType.get() == RE::BSShader::Type::Effect) {
if (descriptor & static_cast<uint32_t>(ShaderCache::EffectShaderFlags::Lighting)) {
} else {
return nullptr;
}
}

auto state = State::GetSingleton();
if (!((ShaderCache::IsSupportedShader(shader) || state->IsDeveloperMode() && state->IsShaderEnabled(shader)) && state->enablePShaders)) {
return nullptr;
Expand Down

0 comments on commit 47acdbb

Please sign in to comment.