Add Texture Group option for triplanar and procedural samplers

#3904
This commit is contained in:
Wojtek Figat
2026-02-01 23:11:44 +01:00
parent 87ccaa9dd8
commit 2ab8b9dd55
2 changed files with 60 additions and 21 deletions

View File

@@ -534,7 +534,7 @@ void MaterialGenerator::ProcessGroupTextures(Box* box, Node* node, Value& value)
}
// Sample Texture
case 9:
// Procedural Texture Sample
// Procedural Sample Texture
case 17:
{
// Get input boxes
@@ -739,7 +739,7 @@ void MaterialGenerator::ProcessGroupTextures(Box* box, Node* node, Value& value)
const int32 samplerIndex = node->Values.Count() >= 4 ? node->Values[3].AsInt : LinearWrap;
if (samplerIndex == TextureGroup)
{
auto& textureGroupSampler = findOrAddTextureGroupSampler(node->Values[3].AsInt);
auto& textureGroupSampler = findOrAddTextureGroupSampler(node->Values[5].AsInt);
samplerName = *textureGroupSampler.ShaderName;
}
else if (samplerIndex >= 0 && samplerIndex < ARRAY_COUNT(SamplerNames))
@@ -828,7 +828,7 @@ void MaterialGenerator::ProcessGroupTextures(Box* box, Node* node, Value& value)
const int32 samplerIndex = node->Values[3].AsInt;
if (samplerIndex == TextureGroup)
{
auto& textureGroupSampler = findOrAddTextureGroupSampler(node->Values[3].AsInt);
auto& textureGroupSampler = findOrAddTextureGroupSampler(node->Values[5].AsInt);
samplerName = *textureGroupSampler.ShaderName;
}
else if (samplerIndex >= 0 && samplerIndex < ARRAY_COUNT(SamplerNames))