Skip to content

Commit

Permalink
Actually use cached text
Browse files Browse the repository at this point in the history
  • Loading branch information
embeddedt committed Nov 1, 2024
1 parent 8ccc081 commit 77854d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/taumc/glsl/Transformer.java
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public void renameFunctionCall(Map<String, String> names) {
public void renameAndWrapShadow(String oldName, String newName) {
var postfixExpression = new ArrayList<>(postfixExpressions);
for (var cachedExpr : postfixExpression) {
String function = cachedExpr.expr().getText();
String function = cachedExpr.exprText();
if (cachedExpr.expr().function_call_parameters() != null && function.startsWith(oldName + "(")) {
function = "vec4" + "(" + function + ")";
var def = ShaderParser.parseSnippet(function, GLSLParser::postfix_expression);
Expand Down

0 comments on commit 77854d0

Please sign in to comment.