Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/eevee_engine.c
| Show First 20 Lines • Show All 174 Lines • ▼ Show 20 Lines | static void eevee_draw_background(void *vedata) | ||||
| /* Default framebuffer and texture */ | /* Default framebuffer and texture */ | ||||
| DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); | DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); | ||||
| DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get(); | DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get(); | ||||
| /* Sort transparents before the loop. */ | /* Sort transparents before the loop. */ | ||||
| DRW_pass_sort_shgroup_z(psl->transparent_pass); | DRW_pass_sort_shgroup_z(psl->transparent_pass); | ||||
| /* Number of iteration: needed for all temporal effect (SSR, volumetrics) | /* Number of iteration: Use viewport taa_samples when using viewport rendering */ | ||||
| * when using opengl render. */ | int loop_len = 1; | ||||
fclem: I'm not sure about this. This seems arbitrary and opaque to the user. I would just use max_ii(1… | |||||
| int loop_len = (DRW_state_is_image_render() && | if (DRW_state_is_image_render()) { | ||||
| (stl->effects->enabled_effects & (EFFECT_VOLUMETRIC | EFFECT_SSR)) != 0) ? | const DRWContextState *draw_ctx = DRW_context_state_get(); | ||||
| 4 : | const Scene *scene = draw_ctx->scene; | ||||
| 1; | loop_len = MAX2(1, scene->eevee.taa_samples); | ||||
Done Inline Actionsscene->eevee.taa_samples can be 0 in which case it may not draw at all. fclem: scene->eevee.taa_samples can be 0 in which case it may not draw at all. | |||||
| } | |||||
| while (loop_len--) { | while (loop_len--) { | ||||
| float clear_col[4] = {0.0f, 0.0f, 0.0f, 0.0f}; | float clear_col[4] = {0.0f, 0.0f, 0.0f, 0.0f}; | ||||
| float clear_depth = 1.0f; | float clear_depth = 1.0f; | ||||
| uint clear_stencil = 0x0; | uint clear_stencil = 0x0; | ||||
| uint primes[3] = {2, 3, 7}; | uint primes[3] = {2, 3, 7}; | ||||
| double offset[3] = {0.0, 0.0, 0.0}; | double offset[3] = {0.0, 0.0, 0.0}; | ||||
| double r[3]; | double r[3]; | ||||
| ▲ Show 20 Lines • Show All 300 Lines • Show Last 20 Lines | |||||
I'm not sure about this. This seems arbitrary and opaque to the user. I would just use max_ii(1, scene->eevee.taa_samples) instead.