Add glTF PBR model loading
[opengl.git] / metallicroughness.py
diff --git a/metallicroughness.py b/metallicroughness.py
new file mode 100755 (executable)
index 0000000..e4bf1b8
--- /dev/null
@@ -0,0 +1,15 @@
+#!/usr/bin/env python3
+import cv2
+
+import sys
+
+metallic = cv2.imread(sys.argv[1])
+roughness = cv2.imread(sys.argv[2])
+
+roughness[:,:,0] = 0
+roughness[:,:,2] = 0
+
+metallic[:,:,0] = 0
+metallic[:,:,1] = 0
+
+cv2.imwrite(sys.argv[3], roughness + metallic)