diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-04-25 11:59:48 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-04-25 12:09:49 +0300 |
commit | 35220ccde0cf77ee11f01ebd2c3d7b3f60d72903 (patch) | |
tree | af5ace5652995b3b355286639a5b67e784859f33 /source/blender/gpu | |
parent | fc8d9030000aa77dc26b8ff4c442672894e28ffc (diff) |
Silhouette Overlap Overlay
Added Object Overlap Overlay
- Added R32UI support to GPU_framebuffer
- Added R32U support to draw manager
- The overlay mode has a object data pass that will render 'needed' data to specific buffers so we can mix them together via a deferred rendering. In future will also add UV's and other data
- Overlap is implemented as an overlay so it could be used on top of the Scene lighted Solid mode (that will be rendered by Eevee.
Reviewers: fclem, brecht
Reviewed By: fclem
Subscribers: sergey
Tags: #code_quest
Maniphest Tasks: T54726
Differential Revision: https://developer.blender.org/D3174
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/GPU_texture.h | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_texture.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h index 92dc512e27d..a783a69ae6b 100644 --- a/source/blender/gpu/GPU_texture.h +++ b/source/blender/gpu/GPU_texture.h @@ -69,6 +69,7 @@ typedef enum GPUTextureFormat { GPU_RG16F, GPU_RG16I, GPU_R32F, + GPU_R32UI, GPU_R16F, GPU_R16I, GPU_R16UI, @@ -89,7 +90,6 @@ typedef enum GPUTextureFormat { GPU_RG8I, GPU_RG8UI, GPU_R32I, - GPU_R32UI, GPU_R16, GPU_R8I, GPU_R8UI, diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c index 30c83091448..bbb26756bf1 100644 --- a/source/blender/gpu/intern/gpu_texture.c +++ b/source/blender/gpu/intern/gpu_texture.c @@ -147,8 +147,8 @@ static GLenum gpu_texture_get_format( } else { /* Integer formats */ - if (ELEM(data_type, GPU_RG16I, GPU_R16I, GPU_R16UI)) { - if (ELEM(data_type, GPU_R16UI)) { + if (ELEM(data_type, GPU_RG16I, GPU_R16I, GPU_R16UI, GPU_R32UI)) { + if (ELEM(data_type, GPU_R16UI, GPU_R32UI)) { *data_format = GL_UNSIGNED_INT; } else { @@ -197,6 +197,7 @@ static GLenum gpu_texture_get_format( case GPU_RGBA8: case GPU_R11F_G11F_B10F: case GPU_R32F: + case GPU_R32UI: *bytesize = 4; break; case GPU_DEPTH_COMPONENT24: @@ -228,6 +229,7 @@ static GLenum gpu_texture_get_format( case GPU_RG16I: return GL_RG16I; case GPU_RGBA8: return GL_RGBA8; case GPU_R32F: return GL_R32F; + case GPU_R32UI: return GL_R32UI; case GPU_R16F: return GL_R16F; case GPU_R16I: return GL_R16I; case GPU_R16UI: return GL_R16UI; |