Browse Source

顶点坐标为负数容错

jsonwang 3 years ago
parent
commit
3864f73293
1 changed files with 7 additions and 0 deletions
  1. 7 0
      BFFramework/Classes/PQGPUImage/akfilters/PQGPUImageTools.swift

+ 7 - 0
BFFramework/Classes/PQGPUImage/akfilters/PQGPUImageTools.swift

@@ -370,6 +370,13 @@ open class PQGPUImageTools: NSObject {
                     postion.x + cropSizee.width, 1.0,
                 ]
             }
+            //[-0.0005214146, 0.0, 0.9994786, 0.0, -0.0005214146, 1.0, 0.9994786, 1.0]
+            for i in 0 ..< textureCoordinates.count{
+                if(textureCoordinates[i] < 0){
+                    textureCoordinates[i] = 0
+                }
+            }
+             
 
             textureCoordinates = textureCoordinatesForRotation(model: rotationMode, oldTextureCoordinates: textureCoordinates)
         }