瀏覽代碼

Added back the line processor, which was lost in the merge but allows Babylon Native to function.

Justin Murray 6 年之前
父節點
當前提交
617a5972a8
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/Engines/Processors/shaderCodeNode.ts

+ 4 - 0
src/Engines/Processors/shaderCodeNode.ts

@@ -18,6 +18,10 @@ export class ShaderCodeNode {
             let value: string = this.line;
             let processor = options.processor;
             if (processor) {
+                if (processor.linePreProcessor) {
+                    value = processor.linePreProcessor(value, options.isFragment);
+                }
+
                 if (processor.attributeProcessor && StringTools.StartsWith(this.line, "attribute")) {
                     value = processor.attributeProcessor(this.line);
                 } else if (processor.varyingProcessor && StringTools.StartsWith(this.line, "varying")) {