Shader: backport struct fix from phong-lighting
This commit is contained in:
parent
9f05a22db7
commit
f0b6f2122d
|
|
@ -202,7 +202,7 @@ namespace Nz::ShaderAst
|
||||||
else
|
else
|
||||||
accessIdentifierPtr = static_cast<AccessIdentifierExpression*>(indexedExpr.get());
|
accessIdentifierPtr = static_cast<AccessIdentifierExpression*>(indexedExpr.get());
|
||||||
|
|
||||||
accessIdentifierPtr->identifiers.push_back(s->members[fieldIndex].name);
|
accessIdentifierPtr->identifiers.push_back(fieldPtr->name);
|
||||||
accessIdentifierPtr->cachedExpressionType = ResolveType(fieldPtr->type);
|
accessIdentifierPtr->cachedExpressionType = ResolveType(fieldPtr->type);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -1118,6 +1118,9 @@ namespace Nz
|
||||||
bool first = true;
|
bool first = true;
|
||||||
for (const auto& member : node.description.members)
|
for (const auto& member : node.description.members)
|
||||||
{
|
{
|
||||||
|
if (member.cond.HasValue() && !member.cond.GetResultingValue())
|
||||||
|
continue;
|
||||||
|
|
||||||
if (!first)
|
if (!first)
|
||||||
AppendLine();
|
AppendLine();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue