浏览代码

Fix image processing issue

David Catuhe 5 年之前
父节点
当前提交
18c74c72c1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Materials/Node/Blocks/Fragment/imageProcessingBlock.ts

+ 1 - 1
src/Materials/Node/Blocks/Fragment/imageProcessingBlock.ts

@@ -129,7 +129,7 @@ export class ImageProcessingBlock extends NodeMaterialBlock {
         state._emitFunctionFromInclude("imageProcessingDeclaration", comments);
         state._emitFunctionFromInclude("imageProcessingFunctions", comments);
 
-        if (color.connectedPoint!.type === NodeMaterialBlockConnectionPointTypes.Color4) {
+        if (color.connectedPoint!.type === NodeMaterialBlockConnectionPointTypes.Color4 || (color.connectedPoint!.type === NodeMaterialBlockConnectionPointTypes.Vector4) {
             state.compilationString += `${this._declareOutput(output, state)} = ${color.associatedVariableName};\r\n`;
         } else {
             state.compilationString += `${this._declareOutput(output, state)} = vec4(${color.associatedVariableName}, 1.0);\r\n`;