[Bf-blender-cvs] [201952aed23] blender2.8: GPUTexture: Add support for GL_RGBA16 texture format.
Clément Foucault
noreply at git.blender.org
Wed May 30 12:25:26 CEST 2018
Commit: 201952aed23b0e4fc93b93f2145621ffd2d86b0d
Author: Clément Foucault
Date: Mon May 28 12:48:16 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB201952aed23b0e4fc93b93f2145621ffd2d86b0d
GPUTexture: Add support for GL_RGBA16 texture format.
===================================================================
M source/blender/gpu/intern/gpu_texture.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c
index 9bd4bbd89e9..38b38736660 100644
--- a/source/blender/gpu/intern/gpu_texture.c
+++ b/source/blender/gpu/intern/gpu_texture.c
@@ -187,6 +187,7 @@ static GLenum gpu_texture_get_format(
break;
case GPU_RG32F:
case GPU_RGBA16F:
+ case GPU_RGBA16:
*bytesize = 16;
break;
case GPU_RGB16F:
@@ -227,6 +228,7 @@ static GLenum gpu_texture_get_format(
/* Formats texture & renderbuffer */
case GPU_RGBA32F: return GL_RGBA32F;
case GPU_RGBA16F: return GL_RGBA16F;
+ case GPU_RGBA16: return GL_RGBA16;
case GPU_RG32F: return GL_RG32F;
case GPU_RGB16F: return GL_RGB16F;
case GPU_RG16F: return GL_RG16F;
@@ -263,6 +265,7 @@ static int gpu_texture_get_component_count(GPUTextureFormat format)
switch (format) {
case GPU_RGBA8:
case GPU_RGBA16F:
+ case GPU_RGBA16:
case GPU_RGBA32F:
return 4;
case GPU_RGB16F:
More information about the Bf-blender-cvs
mailing list