소스 검색

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")) {