Function shaderReplaceString
- shaderReplaceString(shader, str, newStr, __namedParameters?): string
Parameters
shader: string
str: string | RegExp
newStr: string
__namedParameters: {
append: undefined | boolean;
prepend: undefined | boolean;
replaceAll: undefined | boolean;
str: undefined | string;
} = {}
append: undefined | boolean
prepend: undefined | boolean
replaceAll: undefined | boolean
str: undefined | string
Returns string
Replace a string in a shader function with added options to prepend, append, show warning when not found, and replace all occurrences.