Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2017-05-20 14:11:21 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-05-20 17:58:07 +0300
commit4c3382d55f98c721f6116919acce4abba8f01f11 (patch)
tree94d1afafec67e8ee1ea7663e6cbf5dc5db50cdbb /source/blender/gpu
parent3f1a7aec13cc0cf5c441e463dbd8e9ffdd4b4f44 (diff)
GPUTexture: Enabling R32 format for linear depth encoding.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/GPU_texture.h2
-rw-r--r--source/blender/gpu/intern/gpu_texture.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h
index bd98f4534b3..01390760beb 100644
--- a/source/blender/gpu/GPU_texture.h
+++ b/source/blender/gpu/GPU_texture.h
@@ -67,6 +67,7 @@ typedef enum GPUTextureFormat {
GPU_RGBA8,
GPU_RG32F,
GPU_RG16F,
+ GPU_R32F,
GPU_R16F,
GPU_R8,
#if 0
@@ -85,7 +86,6 @@ typedef enum GPUTextureFormat {
GPU_RG8,
GPU_RG8I,
GPU_RG8UI,
- GPU_R32F,
GPU_R32I,
GPU_R32UI,
GPU_R16I,
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c
index 538ed93b0bf..3ac1571bf82 100644
--- a/source/blender/gpu/intern/gpu_texture.c
+++ b/source/blender/gpu/intern/gpu_texture.c
@@ -159,6 +159,7 @@ static GLenum gpu_texture_get_format(
case GPU_DEPTH_COMPONENT32F:
case GPU_RGBA8:
case GPU_R11F_G11F_B10F:
+ case GPU_R32F:
*bytesize = 4;
break;
case GPU_DEPTH_COMPONENT24:
@@ -186,6 +187,7 @@ static GLenum gpu_texture_get_format(
case GPU_RGB16F: return GL_RGB16F;
case GPU_RG16F: return GL_RG16F;
case GPU_RGBA8: return GL_RGBA8;
+ case GPU_R32F: return GL_R32F;
case GPU_R16F: return GL_R16F;
case GPU_R8: return GL_R8;
/* Special formats texture & renderbuffer */