mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-03-05 12:33:02 +00:00
fix: not setting shader arg flags when auto creating
This commit is contained in:
@@ -626,6 +626,9 @@ namespace
|
|||||||
return std::move(result);
|
return std::move(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (constInfo->techFlags)
|
||||||
|
m_tech_flags |= *constInfo->techFlags;
|
||||||
|
|
||||||
return NoResult{};
|
return NoResult{};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -635,12 +638,21 @@ namespace
|
|||||||
if (!maybeCodeSampler)
|
if (!maybeCodeSampler)
|
||||||
return result::Unexpected(std::format("Missing assignment to shader texture {}", textureResource.m_name));
|
return result::Unexpected(std::format("Missing assignment to shader texture {}", textureResource.m_name));
|
||||||
|
|
||||||
|
const auto samplerInfo = m_common_code_source_infos.GetInfoForCodeSamplerSource(*maybeCodeSampler);
|
||||||
|
if (!samplerInfo)
|
||||||
|
return result::Unexpected(std::format("Missing info for code sampler {}", textureResource.m_name));
|
||||||
|
|
||||||
techset::CommonShaderArgDestination commonDestination;
|
techset::CommonShaderArgDestination commonDestination;
|
||||||
commonDestination.dx11.m_location.texture_index = textureResource.m_bind_point;
|
commonDestination.dx11.m_location.texture_index = textureResource.m_bind_point;
|
||||||
commonDestination.dx11.m_location.sampler_index = samplerBindPoint;
|
commonDestination.dx11.m_location.sampler_index = samplerBindPoint;
|
||||||
commonDestination.dx11.m_size = textureResource.m_bind_count;
|
commonDestination.dx11.m_size = textureResource.m_bind_count;
|
||||||
commonDestination.dx11.m_buffer = 0;
|
commonDestination.dx11.m_buffer = 0;
|
||||||
|
|
||||||
|
if (samplerInfo->techFlags)
|
||||||
|
m_tech_flags |= *samplerInfo->techFlags;
|
||||||
|
if (samplerInfo->customSamplerIndex)
|
||||||
|
m_sampler_flags |= (1 << *samplerInfo->customSamplerIndex);
|
||||||
|
|
||||||
return AcceptShaderSamplerArgument(commonDestination, *maybeCodeSampler);
|
return AcceptShaderSamplerArgument(commonDestination, *maybeCodeSampler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user