mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-13 12:14:17 +01:00
Fix texture naming in Resource Trees
This commit is contained in:
parent
de408e4d58
commit
6959789aa7
1 changed files with 7 additions and 7 deletions
|
|
@ -270,13 +270,13 @@ internal unsafe partial record ResolveContext(
|
||||||
if (samplerId.HasValue)
|
if (samplerId.HasValue)
|
||||||
{
|
{
|
||||||
alreadyProcessedSamplerIds.Add(samplerId.Value);
|
alreadyProcessedSamplerIds.Add(samplerId.Value);
|
||||||
var samplerCrc = GetSamplerCrcById(shpk, samplerId.Value);
|
var textureCrc = GetTextureCrcById(shpk, samplerId.Value);
|
||||||
if (samplerCrc.HasValue)
|
if (textureCrc.HasValue)
|
||||||
{
|
{
|
||||||
if (shpkNames != null && shpkNames.TryGetValue(samplerCrc.Value, out var samplerName))
|
if (shpkNames != null && shpkNames.TryGetValue(textureCrc.Value, out var samplerName))
|
||||||
name = samplerName.Value;
|
name = samplerName.Value;
|
||||||
else
|
else
|
||||||
name = $"Texture 0x{samplerCrc.Value:X8}";
|
name = $"Texture 0x{textureCrc.Value:X8}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -292,9 +292,9 @@ internal unsafe partial record ResolveContext(
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
|
|
||||||
static uint? GetSamplerCrcById(ShaderPackage* shpk, uint id)
|
static uint? GetTextureCrcById(ShaderPackage* shpk, uint id)
|
||||||
=> shpk->SamplersSpan.FindFirst(s => s.Id == id, out var s)
|
=> shpk->TexturesSpan.FindFirst(t => t.Id == id, out var t)
|
||||||
? s.CRC
|
? t.CRC
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
static uint? GetTextureSamplerId(Material* mtrl, TextureResourceHandle* handle, HashSet<uint> alreadyVisitedSamplerIds)
|
static uint? GetTextureSamplerId(Material* mtrl, TextureResourceHandle* handle, HashSet<uint> alreadyVisitedSamplerIds)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue