Eevee: Fix some issues

Fix issue with manipulator contributing to depth.
Fix blender internal shader.
This commit is contained in:
Clément Foucault 2017-05-10 10:31:17 +02:00
parent 7902e3f1c8
commit da8b34e527
4 changed files with 8 additions and 5 deletions

View File

@ -688,6 +688,7 @@ static void EEVEE_draw_scene(void *vedata)
DRW_framebuffer_texture_detach(dtxl->depth);
DRW_framebuffer_texture_attach(fbl->main, dtxl->depth, 0, 0);
DRW_framebuffer_bind(fbl->main);
DRW_framebuffer_clear(false, true, false, NULL, 1.0f);
DRW_draw_pass(psl->background_pass);
DRW_draw_pass(psl->depth_pass);

View File

@ -1,6 +1,4 @@
mat4 ViewProjectionMatrixInverse;
in vec2 pos;
out vec3 varposition;

View File

@ -2605,11 +2605,11 @@ void DRW_draw_render_loop(
DRW_engines_draw_text();
/* needed so manipulator isn't obscured */
glClear(GL_DEPTH_BUFFER_BIT);
if (DST.draw_ctx.evil_C) {
/* needed so manipulator isn't obscured */
glDisable(GL_DEPTH_TEST);
DRW_draw_manipulator();
glEnable(GL_DEPTH_TEST);
DRW_draw_region_info();
}

View File

@ -3896,6 +3896,9 @@ void convert_metallic_to_specular(vec4 basecol, float metallic, float specular_f
f0 = mix(dielectric, basecol, metallic);
}
/* TODO : clean this ifdef mess */
/* EEVEE output */
#ifdef PROBE_CAPTURE
void world_normals_get(out vec3 N)
{
N = gl_FrontFacing ? worldNormal : -worldNormal;
@ -3919,6 +3922,7 @@ void node_output_specular(
{
result = vec4(eevee_surface_lit(normal, diffuse.rgb, specular.rgb, roughness, occlusion) + emissive.rgb, 1.0 - transp);
}
#endif
/* ********************** matcap style render ******************** */