Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixes for effect shader; effect shader enabled fully. #427

Merged
merged 1 commit into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading