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:
authorValdemar Lindberg <Voldie>2020-12-16 16:21:38 +0300
committerJeroen Bakker <jeroen@blender.org>2020-12-16 16:21:51 +0300
commit69c3f4a46d4621300ca2aa3ab778b24cb1713e95 (patch)
treef4f44a3a570ab8e503090c308e4073df856a49cd
parent29f923b27c5c0a183791a2a97e80c5f469a4ef51 (diff)
Fix 3D View is red when using stereo
Fix T83415: 3D View is red when using stereo The red view was caused by SRGB not being enabled for an SRGB texture attached to the framebuffer. Currently, when configuring a framebuffer, the first texture attachment needs to be an SRGB format in order for the framebuffer to be binded with SRGB enabled. Thus, simply changing the SRGB texture attachment as the first texture attachment removes the red color in the view. Reviewed By: #eevee_viewport, jbakker Maniphest Tasks: T83415 Differential Revision: https://developer.blender.org/D9845
m---------release/datafiles/locale0
m---------release/scripts/addons0
-rw-r--r--source/blender/gpu/intern/gpu_viewport.c6
3 files changed, 3 insertions, 3 deletions
diff --git a/release/datafiles/locale b/release/datafiles/locale
-Subproject 9e40c01dffd3f720b23b906d20df8e999d34a4a
+Subproject 877a343fed9613d8e02e7fe7181d3bbb628506f
diff --git a/release/scripts/addons b/release/scripts/addons
-Subproject 1a3f127714e8da9f0af12d9a174dae9793ae63c
+Subproject a3fa40ec0ba525bc96cbfad49f854a0230b0524
diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c
index 188c8786665..a83654d31e7 100644
--- a/source/blender/gpu/intern/gpu_viewport.c
+++ b/source/blender/gpu/intern/gpu_viewport.c
@@ -616,8 +616,8 @@ void GPU_viewport_stereo_composite(GPUViewport *viewport, Stereo3dFormat *stereo
GPU_framebuffer_ensure_config(&dfbl->stereo_comp_fb,
{
GPU_ATTACHMENT_NONE,
- GPU_ATTACHMENT_TEXTURE(dtxl->color),
GPU_ATTACHMENT_TEXTURE(dtxl->color_overlay),
+ GPU_ATTACHMENT_TEXTURE(dtxl->color),
});
GPUVertFormat *vert_format = immVertexFormat();
@@ -628,8 +628,8 @@ void GPU_viewport_stereo_composite(GPUViewport *viewport, Stereo3dFormat *stereo
GPU_matrix_identity_set();
GPU_matrix_identity_projection_set();
immBindBuiltinProgram(GPU_SHADER_2D_IMAGE_OVERLAYS_STEREO_MERGE);
- immUniform1i("imageTexture", 0);
- immUniform1i("overlayTexture", 1);
+ immUniform1i("overlayTexture", 0);
+ immUniform1i("imageTexture", 1);
int settings = stereo_format->display_mode;
if (settings == S3D_DISPLAY_ANAGLYPH) {
switch (stereo_format->anaglyph_type) {