Fixed an issue with the ShaderNodeGenerator that was missing some variable names in cases like that ',myVar,myVar.x'
This commit is contained in:
parent
2066c98dd0
commit
0ebb3acb16
@ -517,7 +517,7 @@ public class Glsl100ShaderGenerator extends ShaderGenerator {
|
||||
* @return the modified source code
|
||||
*/
|
||||
protected String replace(String nodeSource, ShaderNodeVariable var, String newName) {
|
||||
nodeSource = nodeSource.replaceAll("(\\W)" + var.getName() + "(\\W)", "$1" + newName + "$2");
|
||||
nodeSource = nodeSource.replaceAll("(?<=\\W)" + var.getName() + "(?=\\W)", newName);
|
||||
return nodeSource;
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,6 @@ public abstract class ShaderGenerator {
|
||||
/**
|
||||
* Generate vertex and fragment shaders for the given technique
|
||||
*
|
||||
* @param technique the technique to use to generate the shaders
|
||||
* @return a Shader program
|
||||
*/
|
||||
public Shader generateShader() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user