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
This commit is contained in:
parent
29f923b27c
commit
69c3f4a46d
Notes:
blender-bot
2023-02-14 05:53:42 +01:00
Referenced by issue #83415, 3D View is red when using stereo
|
@ -1 +1 @@
|
|||
Subproject commit 9e40c01dffd3f720b23b906d20df8e999d34a4af
|
||||
Subproject commit 877a343fed9613d8e02e7fe7181d3bbb628506f2
|
|
@ -1 +1 @@
|
|||
Subproject commit 1a3f127714e8da9f0af12d9a174dae9793ae63c1
|
||||
Subproject commit a3fa40ec0ba525bc96cbfad49f854a0230b0524e
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue