فهرست منبع

quick fix for attribute in native shader preprocessor

Cedric Guillemet 5 سال پیش
والد
کامیت
8928f684a8
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/Engines/Native/nativeShaderProcessor.ts

+ 1 - 1
src/Engines/Native/nativeShaderProcessor.ts

@@ -67,7 +67,7 @@ export class NativeShaderProcessor extends WebGL2ShaderProcessor {
             throw new Error("Can't find bgfx name mapping");
         }
         attribute = attribute.replace(name, newName);
-        this._replacements.push({ searchValue: new RegExp(`\\b${name}\\b`), replaceValue: `${newName}` });
+        this._replacements.push({ searchValue: new RegExp(`\\b${name}\\b`, 'g'), replaceValue: `${newName}` });
         return `layout(location=${location}) ${super.attributeProcessor(attribute)}`;
     }