Add Custom Global Code node to materials for injecting custom code, includes or constants

This commit is contained in:
Wojtek Figat
2022-04-15 17:04:28 +02:00
parent 991abb1cf8
commit 493787d4d6
7 changed files with 43 additions and 13 deletions

View File

@@ -9,7 +9,7 @@ MaterialValue* MaterialGenerator::sampleTextureRaw(Node* caller, Value& value, B
ASSERT(texture && box);
// Cache data
const auto parent = box->GetParent<MaterialGraphNode>();
const auto parent = box->GetParent<ShaderGraphNode<>>();
const bool isCubemap = texture->Type == MaterialParameterType::CubeTexture;
const bool isArray = texture->Type == MaterialParameterType::GPUTextureArray;
const bool isVolume = texture->Type == MaterialParameterType::GPUTextureVolume;