浏览代码

getPixelF support for RG32F

trethaller 4 年之前
父节点
当前提交
efdabc353b
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      hxd/Pixels.hx

+ 3 - 0
hxd/Pixels.hx

@@ -468,6 +468,9 @@ class Pixels {
 		case R32F:
 			v.set(bytes.getFloat(p),0,0,0);
 			return v;
+		case RG32F:
+			v.set(bytes.getFloat(p), bytes.getFloat(p+4),0,0);
+			return v;
 		case RGBA32F:
 			v.set(bytes.getFloat(p), bytes.getFloat(p+4), bytes.getFloat(p+8), bytes.getFloat(p+12));
 			return v;