diff --git a/jme3-core/src/main/java/com/jme3/shader/Glsl100ShaderGenerator.java b/jme3-core/src/main/java/com/jme3/shader/Glsl100ShaderGenerator.java index 574fdcd3d..b00129005 100644 --- a/jme3-core/src/main/java/com/jme3/shader/Glsl100ShaderGenerator.java +++ b/jme3-core/src/main/java/com/jme3/shader/Glsl100ShaderGenerator.java @@ -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; } diff --git a/jme3-core/src/main/java/com/jme3/shader/ShaderGenerator.java b/jme3-core/src/main/java/com/jme3/shader/ShaderGenerator.java index cf319dd18..5035ff787 100644 --- a/jme3-core/src/main/java/com/jme3/shader/ShaderGenerator.java +++ b/jme3-core/src/main/java/com/jme3/shader/ShaderGenerator.java @@ -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() {