소스 검색

Adding getPixels of R16U format.

clementlandrin 1 년 전
부모
커밋
60ade35802
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      hxd/Pixels.hx

+ 3 - 0
hxd/Pixels.hx

@@ -466,6 +466,9 @@ class Pixels {
 		case RGBA32F:
 			v.set(bytes.getFloat(p), bytes.getFloat(p+4), bytes.getFloat(p+8), bytes.getFloat(p+12));
 			return v;
+		case R16U:
+			v.set(bytes.getUInt16(p) / 65535.0,0,0,0);
+			return v;
 		default:
 			v.setColor(getPixel(x,y));
 			return v;