Cleanup: whitespace, long lines, duplicate include
This commit is contained in:
parent
3e3f6754b4
commit
6ebcf98943
|
@ -437,7 +437,7 @@ ViewLayer *BKE_workspace_view_layer_get(const WorkSpace *workspace, const Scene
|
|||
ViewLayer *layer = BKE_workspace_view_layer_exists(workspace, scene);
|
||||
|
||||
if (layer == NULL) {
|
||||
BKE_workspace_view_layer_set((WorkSpace*)workspace, scene->view_layers.first, (Scene *)scene);
|
||||
BKE_workspace_view_layer_set((WorkSpace *)workspace, scene->view_layers.first, (Scene *)scene);
|
||||
layer = scene->view_layers.first;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,8 @@ static void basic_cache_init(void *vedata)
|
|||
#ifdef USE_DEPTH
|
||||
/* Depth Pass */
|
||||
{
|
||||
psl->depth_pass = DRW_pass_create("Depth Pass", DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_WIRE);
|
||||
psl->depth_pass = DRW_pass_create(
|
||||
"Depth Pass", DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_WIRE);
|
||||
stl->g_data->depth_shgrp = DRW_shgroup_create(e_data.depth_sh, psl->depth_pass);
|
||||
|
||||
psl->depth_pass_cull = DRW_pass_create(
|
||||
|
|
|
@ -224,7 +224,8 @@ static void clay_view_layer_data_free(void *storage)
|
|||
|
||||
static CLAY_ViewLayerData *CLAY_view_layer_data_get(void)
|
||||
{
|
||||
CLAY_ViewLayerData **sldata = (CLAY_ViewLayerData **)DRW_view_layer_engine_data_ensure(&draw_engine_clay_type, &clay_view_layer_data_free);
|
||||
CLAY_ViewLayerData **sldata = (CLAY_ViewLayerData **)DRW_view_layer_engine_data_ensure(
|
||||
&draw_engine_clay_type, &clay_view_layer_data_free);
|
||||
|
||||
if (*sldata == NULL) {
|
||||
*sldata = MEM_callocN(sizeof(**sldata), "CLAY_ViewLayerData");
|
||||
|
@ -751,7 +752,8 @@ static DRWShadingGroup *CLAY_object_shgrp_get(CLAY_Data *vedata, Object *ob, boo
|
|||
return shgrps[id];
|
||||
}
|
||||
|
||||
static DRWShadingGroup *CLAY_hair_shgrp_get(CLAY_Data *UNUSED(vedata), Object *ob, CLAY_StorageList *stl, CLAY_PassList *psl)
|
||||
static DRWShadingGroup *CLAY_hair_shgrp_get(
|
||||
CLAY_Data *UNUSED(vedata), Object *ob, CLAY_StorageList *stl, CLAY_PassList *psl)
|
||||
{
|
||||
DRWShadingGroup **hair_shgrps = stl->storage->hair_shgrps;
|
||||
|
||||
|
@ -803,8 +805,8 @@ static void clay_cache_init(void *vedata)
|
|||
/* Hair Pass */
|
||||
{
|
||||
psl->hair_pass = DRW_pass_create(
|
||||
"Hair Pass",
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_WIRE);
|
||||
"Hair Pass",
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_WIRE);
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
@ -305,7 +305,8 @@ void EEVEE_effects_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
|
|||
struct Gwn_Batch *quad = DRW_cache_fullscreen_quad_get();
|
||||
|
||||
{
|
||||
psl->color_downsample_ps = DRW_pass_create("Downsample", DRW_STATE_WRITE_COLOR);
|
||||
psl->color_downsample_ps = DRW_pass_create(
|
||||
"Downsample", DRW_STATE_WRITE_COLOR);
|
||||
DRWShadingGroup *grp = DRW_shgroup_create(e_data.downsample_sh, psl->color_downsample_ps);
|
||||
DRW_shgroup_uniform_texture_ref(grp, "source", &e_data.color_src);
|
||||
DRW_shgroup_uniform_float(grp, "fireflyFactor", &sldata->common_data.ssr_firefly_fac, 1);
|
||||
|
@ -315,7 +316,8 @@ void EEVEE_effects_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
|
|||
{
|
||||
static int zero = 0;
|
||||
static uint six = 6;
|
||||
psl->color_downsample_cube_ps = DRW_pass_create("Downsample Cube", DRW_STATE_WRITE_COLOR);
|
||||
psl->color_downsample_cube_ps = DRW_pass_create(
|
||||
"Downsample Cube", DRW_STATE_WRITE_COLOR);
|
||||
DRWShadingGroup *grp = DRW_shgroup_create(e_data.downsample_cube_sh, psl->color_downsample_cube_ps);
|
||||
DRW_shgroup_uniform_texture_ref(grp, "source", &e_data.color_src);
|
||||
DRW_shgroup_uniform_float(grp, "texelSize", &e_data.cube_texel_size, 1);
|
||||
|
@ -327,25 +329,29 @@ void EEVEE_effects_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
|
|||
/* Perform min/max downsample */
|
||||
DRWShadingGroup *grp;
|
||||
|
||||
psl->maxz_downlevel_ps = DRW_pass_create("HiZ Max Down Level", downsample_write | DRW_STATE_DEPTH_ALWAYS);
|
||||
psl->maxz_downlevel_ps = DRW_pass_create(
|
||||
"HiZ Max Down Level", downsample_write | DRW_STATE_DEPTH_ALWAYS);
|
||||
grp = DRW_shgroup_create(e_data.maxz_downlevel_sh, psl->maxz_downlevel_ps);
|
||||
DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &txl->maxzbuffer);
|
||||
DRW_shgroup_call_add(grp, quad, NULL);
|
||||
|
||||
/* Copy depth buffer to halfres top level of HiZ */
|
||||
|
||||
psl->maxz_downdepth_ps = DRW_pass_create("HiZ Max Copy Depth Halfres", downsample_write | DRW_STATE_DEPTH_ALWAYS);
|
||||
psl->maxz_downdepth_ps = DRW_pass_create(
|
||||
"HiZ Max Copy Depth Halfres", downsample_write | DRW_STATE_DEPTH_ALWAYS);
|
||||
grp = DRW_shgroup_create(e_data.maxz_downdepth_sh, psl->maxz_downdepth_ps);
|
||||
DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &e_data.depth_src);
|
||||
DRW_shgroup_call_add(grp, quad, NULL);
|
||||
|
||||
psl->maxz_downdepth_layer_ps = DRW_pass_create("HiZ Max Copy DepthLayer Halfres", downsample_write | DRW_STATE_DEPTH_ALWAYS);
|
||||
psl->maxz_downdepth_layer_ps = DRW_pass_create(
|
||||
"HiZ Max Copy DepthLayer Halfres", downsample_write | DRW_STATE_DEPTH_ALWAYS);
|
||||
grp = DRW_shgroup_create(e_data.maxz_downdepth_layer_sh, psl->maxz_downdepth_layer_ps);
|
||||
DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &e_data.depth_src);
|
||||
DRW_shgroup_uniform_int(grp, "depthLayer", &e_data.depth_src_layer, 1);
|
||||
DRW_shgroup_call_add(grp, quad, NULL);
|
||||
|
||||
psl->maxz_copydepth_ps = DRW_pass_create("HiZ Max Copy Depth Fullres", downsample_write | DRW_STATE_DEPTH_ALWAYS);
|
||||
psl->maxz_copydepth_ps = DRW_pass_create(
|
||||
"HiZ Max Copy Depth Fullres", downsample_write | DRW_STATE_DEPTH_ALWAYS);
|
||||
grp = DRW_shgroup_create(e_data.maxz_copydepth_sh, psl->maxz_copydepth_ps);
|
||||
DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &e_data.depth_src);
|
||||
DRW_shgroup_call_add(grp, quad, NULL);
|
||||
|
@ -353,7 +359,8 @@ void EEVEE_effects_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
|
|||
|
||||
if ((effects->enabled_effects & EFFECT_VELOCITY_BUFFER) != 0) {
|
||||
/* This pass compute camera motions to the non moving objects. */
|
||||
psl->velocity_resolve = DRW_pass_create("Velocity Resolve", DRW_STATE_WRITE_COLOR);
|
||||
psl->velocity_resolve = DRW_pass_create(
|
||||
"Velocity Resolve", DRW_STATE_WRITE_COLOR);
|
||||
DRWShadingGroup *grp = DRW_shgroup_create(e_data.velocity_resolve_sh, psl->velocity_resolve);
|
||||
DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &e_data.depth_src);
|
||||
DRW_shgroup_uniform_block(grp, "common_block", sldata->common_ubo);
|
||||
|
|
|
@ -82,7 +82,8 @@ static bool lightbits_get(const EEVEE_LightBits *r, uint idx)
|
|||
return r->fields[idx / 8] & (1 << (idx % 8));
|
||||
}
|
||||
|
||||
static void lightbits_convert(EEVEE_LightBits *r, const EEVEE_LightBits *bitf, const int *light_bit_conv_table, uint table_length)
|
||||
static void lightbits_convert(
|
||||
EEVEE_LightBits *r, const EEVEE_LightBits *bitf, const int *light_bit_conv_table, uint table_length)
|
||||
{
|
||||
for (int i = 0; i < table_length; ++i) {
|
||||
if (lightbits_get(bitf, i) != 0) {
|
||||
|
|
|
@ -936,7 +936,8 @@ void EEVEE_materials_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
|
|||
|
||||
state = DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_CLIP_PLANES | DRW_STATE_CULL_BACK;
|
||||
psl->depth_pass_clip_cull = DRW_pass_create("Depth Pass Cull Clip", state);
|
||||
stl->g_data->depth_shgrp_clip_cull = DRW_shgroup_create(e_data.default_prepass_clip_sh, psl->depth_pass_clip_cull);
|
||||
stl->g_data->depth_shgrp_clip_cull = DRW_shgroup_create(
|
||||
e_data.default_prepass_clip_sh, psl->depth_pass_clip_cull);
|
||||
DRW_shgroup_uniform_block(stl->g_data->depth_shgrp_clip_cull, "clip_block", sldata->clip_ubo);
|
||||
}
|
||||
|
||||
|
@ -952,26 +953,33 @@ void EEVEE_materials_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
|
|||
|
||||
state = DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_CULL_BACK;
|
||||
psl->refract_depth_pass_cull = DRW_pass_create("Refract Depth Pass Cull", state);
|
||||
stl->g_data->refract_depth_shgrp_cull = DRW_shgroup_create(e_data.default_prepass_sh, psl->refract_depth_pass_cull);
|
||||
stl->g_data->refract_depth_shgrp_cull = DRW_shgroup_create(
|
||||
e_data.default_prepass_sh, psl->refract_depth_pass_cull);
|
||||
|
||||
state = DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_CLIP_PLANES | DRW_STATE_WIRE;
|
||||
psl->refract_depth_pass_clip = DRW_pass_create("Refract Depth Pass Clip", state);
|
||||
stl->g_data->refract_depth_shgrp_clip = DRW_shgroup_create(e_data.default_prepass_clip_sh, psl->refract_depth_pass_clip);
|
||||
stl->g_data->refract_depth_shgrp_clip = DRW_shgroup_create(
|
||||
e_data.default_prepass_clip_sh, psl->refract_depth_pass_clip);
|
||||
DRW_shgroup_uniform_block(stl->g_data->refract_depth_shgrp_clip, "clip_block", sldata->clip_ubo);
|
||||
|
||||
state = DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_CLIP_PLANES | DRW_STATE_CULL_BACK;
|
||||
psl->refract_depth_pass_clip_cull = DRW_pass_create("Refract Depth Pass Cull Clip", state);
|
||||
stl->g_data->refract_depth_shgrp_clip_cull = DRW_shgroup_create(e_data.default_prepass_clip_sh, psl->refract_depth_pass_clip_cull);
|
||||
stl->g_data->refract_depth_shgrp_clip_cull = DRW_shgroup_create(
|
||||
e_data.default_prepass_clip_sh, psl->refract_depth_pass_clip_cull);
|
||||
DRW_shgroup_uniform_block(stl->g_data->refract_depth_shgrp_clip_cull, "clip_block", sldata->clip_ubo);
|
||||
}
|
||||
|
||||
{
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_CLIP_PLANES | DRW_STATE_WIRE;
|
||||
DRWState state = (
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_CLIP_PLANES |
|
||||
DRW_STATE_WIRE);
|
||||
psl->refract_pass = DRW_pass_create("Opaque Refraction Pass", state);
|
||||
}
|
||||
|
||||
{
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_CLIP_PLANES | DRW_STATE_WIRE | DRW_STATE_WRITE_STENCIL;
|
||||
DRWState state = (
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_CLIP_PLANES |
|
||||
DRW_STATE_WIRE | DRW_STATE_WRITE_STENCIL);
|
||||
psl->sss_pass = DRW_pass_create("Subsurface Pass", state);
|
||||
e_data.sss_count = 0;
|
||||
}
|
||||
|
@ -1062,16 +1070,16 @@ static void material_opaque(
|
|||
static float half = 0.5f;
|
||||
|
||||
/* Shading */
|
||||
*gpumat = EEVEE_material_mesh_get(scene, ma, vedata, false, false, use_refract,
|
||||
use_sss, use_translucency, linfo->shadow_method);
|
||||
*gpumat = EEVEE_material_mesh_get(
|
||||
scene, ma, vedata, false, false, use_refract,
|
||||
use_sss, use_translucency, linfo->shadow_method);
|
||||
|
||||
GPUMaterialStatus status_mat_surface = GPU_material_status(*gpumat);
|
||||
|
||||
/* Alpha CLipped : Discard pixel from depth pass, then
|
||||
* fail the depth test for shading. */
|
||||
if (ELEM(ma->blend_method, MA_BM_CLIP, MA_BM_HASHED)) {
|
||||
*gpumat_depth = EEVEE_material_mesh_depth_get(scene, ma,
|
||||
(ma->blend_method == MA_BM_HASHED), false);
|
||||
*gpumat_depth = EEVEE_material_mesh_depth_get(scene, ma, (ma->blend_method == MA_BM_HASHED), false);
|
||||
|
||||
GPUMaterialStatus status_mat_depth = GPU_material_status(*gpumat_depth);
|
||||
if (status_mat_depth != GPU_MAT_SUCCESS) {
|
||||
|
@ -1080,12 +1088,16 @@ static void material_opaque(
|
|||
status_mat_surface = status_mat_depth;
|
||||
}
|
||||
else if (use_refract) {
|
||||
*shgrp_depth = DRW_shgroup_material_create(*gpumat_depth, (do_cull) ? psl->refract_depth_pass_cull : psl->refract_depth_pass);
|
||||
*shgrp_depth_clip = DRW_shgroup_material_create(*gpumat_depth, (do_cull) ? psl->refract_depth_pass_clip_cull : psl->refract_depth_pass_clip);
|
||||
*shgrp_depth = DRW_shgroup_material_create(
|
||||
*gpumat_depth, (do_cull) ? psl->refract_depth_pass_cull : psl->refract_depth_pass);
|
||||
*shgrp_depth_clip = DRW_shgroup_material_create(
|
||||
*gpumat_depth, (do_cull) ? psl->refract_depth_pass_clip_cull : psl->refract_depth_pass_clip);
|
||||
}
|
||||
else {
|
||||
*shgrp_depth = DRW_shgroup_material_create(*gpumat_depth, (do_cull) ? psl->depth_pass_cull : psl->depth_pass);
|
||||
*shgrp_depth_clip = DRW_shgroup_material_create(*gpumat_depth, (do_cull) ? psl->depth_pass_clip_cull : psl->depth_pass_clip);
|
||||
*shgrp_depth = DRW_shgroup_material_create(
|
||||
*gpumat_depth, (do_cull) ? psl->depth_pass_cull : psl->depth_pass);
|
||||
*shgrp_depth_clip = DRW_shgroup_material_create(
|
||||
*gpumat_depth, (do_cull) ? psl->depth_pass_clip_cull : psl->depth_pass_clip);
|
||||
}
|
||||
|
||||
if (*shgrp_depth != NULL) {
|
||||
|
@ -1110,16 +1122,18 @@ static void material_opaque(
|
|||
static int first_ssr = 1;
|
||||
int *ssr_id = (((effects->enabled_effects & EFFECT_SSR) != 0) && !use_refract) ? &first_ssr : &no_ssr;
|
||||
|
||||
*shgrp = DRW_shgroup_material_create(*gpumat,
|
||||
(use_refract) ? psl->refract_pass :
|
||||
(use_sss) ? psl->sss_pass : psl->material_pass);
|
||||
*shgrp = DRW_shgroup_material_create(
|
||||
*gpumat,
|
||||
(use_refract) ? psl->refract_pass :
|
||||
(use_sss) ? psl->sss_pass : psl->material_pass);
|
||||
add_standard_uniforms(*shgrp, sldata, vedata, ssr_id, &ma->refract_depth, use_refract, false);
|
||||
|
||||
if (use_sss) {
|
||||
struct GPUTexture *sss_tex_profile = NULL;
|
||||
struct GPUUniformBuffer *sss_profile = GPU_material_sss_profile_get(*gpumat,
|
||||
stl->effects->sss_sample_count,
|
||||
&sss_tex_profile);
|
||||
struct GPUUniformBuffer *sss_profile = GPU_material_sss_profile_get(
|
||||
*gpumat,
|
||||
stl->effects->sss_sample_count,
|
||||
&sss_tex_profile);
|
||||
|
||||
if (sss_profile) {
|
||||
if (use_translucency) {
|
||||
|
@ -1188,7 +1202,8 @@ static void material_opaque(
|
|||
|
||||
static void material_transparent(
|
||||
Material *ma, EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata,
|
||||
bool do_cull, bool use_flat_nor, struct GPUMaterial **gpumat, struct DRWShadingGroup **shgrp, struct DRWShadingGroup **shgrp_depth)
|
||||
bool do_cull, bool use_flat_nor,
|
||||
struct GPUMaterial **gpumat, struct DRWShadingGroup **shgrp, struct DRWShadingGroup **shgrp_depth)
|
||||
{
|
||||
const DRWContextState *draw_ctx = DRW_context_state_get();
|
||||
Scene *scene = draw_ctx->scene;
|
||||
|
@ -1196,8 +1211,10 @@ static void material_transparent(
|
|||
EEVEE_PassList *psl = ((EEVEE_Data *)vedata)->psl;
|
||||
EEVEE_LampsInfo *linfo = sldata->lamps;
|
||||
|
||||
const bool use_refract = ((ma->blend_flag & MA_BL_SS_REFRACTION) != 0) && ((stl->effects->enabled_effects & EFFECT_REFRACT) != 0);
|
||||
|
||||
const bool use_refract = (
|
||||
((ma->blend_flag & MA_BL_SS_REFRACTION) != 0) &&
|
||||
((stl->effects->enabled_effects & EFFECT_REFRACT) != 0)
|
||||
);
|
||||
float *color_p = &ma->r;
|
||||
float *metal_p = &ma->ray_mirror;
|
||||
float *spec_p = &ma->spec;
|
||||
|
@ -1209,8 +1226,9 @@ static void material_transparent(
|
|||
static float half = 0.5f;
|
||||
|
||||
/* Shading */
|
||||
*gpumat = EEVEE_material_mesh_get(scene, ma, vedata, true, (ma->blend_method == MA_BM_MULTIPLY), use_refract,
|
||||
false, false, linfo->shadow_method);
|
||||
*gpumat = EEVEE_material_mesh_get(
|
||||
scene, ma, vedata, true, (ma->blend_method == MA_BM_MULTIPLY), use_refract,
|
||||
false, false, linfo->shadow_method);
|
||||
|
||||
switch (GPU_material_status(*gpumat)) {
|
||||
case GPU_MAT_SUCCESS:
|
||||
|
@ -1251,8 +1269,11 @@ static void material_transparent(
|
|||
|
||||
const bool use_prepass = ((ma->blend_flag & MA_BL_HIDE_BACKSIDE) != 0);
|
||||
|
||||
DRWState all_state = DRW_STATE_WRITE_DEPTH | DRW_STATE_WRITE_COLOR | DRW_STATE_CULL_BACK | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_DEPTH_EQUAL |
|
||||
DRW_STATE_BLEND | DRW_STATE_ADDITIVE | DRW_STATE_MULTIPLY;
|
||||
DRWState all_state = (
|
||||
DRW_STATE_WRITE_DEPTH | DRW_STATE_WRITE_COLOR | DRW_STATE_CULL_BACK |
|
||||
DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_DEPTH_EQUAL |
|
||||
DRW_STATE_BLEND | DRW_STATE_ADDITIVE | DRW_STATE_MULTIPLY
|
||||
);
|
||||
|
||||
DRWState cur_state = DRW_STATE_WRITE_COLOR;
|
||||
cur_state |= (use_prepass) ? DRW_STATE_DEPTH_EQUAL : DRW_STATE_DEPTH_LESS_EQUAL;
|
||||
|
@ -1383,10 +1404,11 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sld
|
|||
char *auto_layer_names;
|
||||
int *auto_layer_is_srgb;
|
||||
int auto_layer_count;
|
||||
struct Gwn_Batch **mat_geom = DRW_cache_object_surface_material_get(ob, gpumat_array, materials_len,
|
||||
&auto_layer_names,
|
||||
&auto_layer_is_srgb,
|
||||
&auto_layer_count);
|
||||
struct Gwn_Batch **mat_geom = DRW_cache_object_surface_material_get(
|
||||
ob, gpumat_array, materials_len,
|
||||
&auto_layer_names,
|
||||
&auto_layer_is_srgb,
|
||||
&auto_layer_count);
|
||||
if (mat_geom) {
|
||||
for (int i = 0; i < materials_len; ++i) {
|
||||
EEVEE_ObjectEngineData *oedata = NULL;
|
||||
|
@ -1440,17 +1462,20 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sld
|
|||
struct GPUMaterial *gpumat;
|
||||
switch (ma->blend_shadow) {
|
||||
case MA_BS_SOLID:
|
||||
EEVEE_lights_cache_shcaster_add(sldata, stl, mat_geom[i], ob);
|
||||
EEVEE_lights_cache_shcaster_add(
|
||||
sldata, stl, mat_geom[i], ob);
|
||||
*cast_shadow = true;
|
||||
break;
|
||||
case MA_BS_CLIP:
|
||||
gpumat = EEVEE_material_mesh_depth_get(scene, ma, false, true);
|
||||
EEVEE_lights_cache_shcaster_material_add(sldata, psl, gpumat, mat_geom[i], ob, &ma->alpha_threshold);
|
||||
EEVEE_lights_cache_shcaster_material_add(
|
||||
sldata, psl, gpumat, mat_geom[i], ob, &ma->alpha_threshold);
|
||||
*cast_shadow = true;
|
||||
break;
|
||||
case MA_BS_HASHED:
|
||||
gpumat = EEVEE_material_mesh_depth_get(scene, ma, true, true);
|
||||
EEVEE_lights_cache_shcaster_material_add(sldata, psl, gpumat, mat_geom[i], ob, NULL);
|
||||
EEVEE_lights_cache_shcaster_material_add(
|
||||
sldata, psl, gpumat, mat_geom[i], ob, NULL);
|
||||
*cast_shadow = true;
|
||||
break;
|
||||
case MA_BS_NONE:
|
||||
|
|
|
@ -809,8 +809,10 @@ struct GPUMaterial *EEVEE_material_world_volume_get(struct Scene *scene, struct
|
|||
struct GPUMaterial *EEVEE_material_mesh_get(
|
||||
struct Scene *scene, Material *ma, EEVEE_Data *vedata,
|
||||
bool use_blend, bool use_multiply, bool use_refract, bool use_sss, bool use_translucency, int shadow_method);
|
||||
struct GPUMaterial *EEVEE_material_mesh_volume_get(struct Scene *scene, Material *ma);
|
||||
struct GPUMaterial *EEVEE_material_mesh_depth_get(struct Scene *scene, Material *ma, bool use_hashed_alpha, bool is_shadow);
|
||||
struct GPUMaterial *EEVEE_material_mesh_volume_get(
|
||||
struct Scene *scene, Material *ma);
|
||||
struct GPUMaterial *EEVEE_material_mesh_depth_get(
|
||||
struct Scene *scene, Material *ma, bool use_hashed_alpha, bool is_shadow);
|
||||
struct GPUMaterial *EEVEE_material_hair_get(struct Scene *scene, Material *ma, int shadow_method);
|
||||
void EEVEE_materials_free(void);
|
||||
void EEVEE_draw_default_passes(EEVEE_PassList *psl);
|
||||
|
|
|
@ -184,7 +184,8 @@ void integrate_slice(vec3 normal, vec2 t_phi, vec2 horizons, inout float visibil
|
|||
bent_normal += vec3(sin(b_angle) * -t_phi, cos(b_angle) * 0.5);
|
||||
}
|
||||
|
||||
void gtao_deferred(vec3 normal, vec3 position, vec4 noise, float frag_depth, out float visibility, out vec3 bent_normal)
|
||||
void gtao_deferred(
|
||||
vec3 normal, vec3 position, vec4 noise, float frag_depth, out float visibility, out vec3 bent_normal)
|
||||
{
|
||||
/* Fetch early, hide latency! */
|
||||
vec4 horizons = texelFetch(horizonBuffer, ivec2(gl_FragCoord.xy), 0);
|
||||
|
|
|
@ -120,7 +120,8 @@ float probe_attenuation_planar(PlanarData pd, vec3 W, vec3 N, float roughness)
|
|||
vec2 dist_to_clip;
|
||||
dist_to_clip.x = dot(pd.pl_clip_pos_x, W);
|
||||
dist_to_clip.y = dot(pd.pl_clip_pos_y, W);
|
||||
fac *= step(2.0, dot(step(pd.pl_clip_edges, dist_to_clip.xxyy), vec2(-1.0, 1.0).xyxy)); /* compare and add all tests */
|
||||
/* compare and add all tests */
|
||||
fac *= step(2.0, dot(step(pd.pl_clip_edges, dist_to_clip.xxyy), vec2(-1.0, 1.0).xyxy));
|
||||
|
||||
/* Decrease influence for high roughness */
|
||||
fac *= saturate(1.0 - roughness * 10.0);
|
||||
|
|
|
@ -61,7 +61,8 @@ float refine_isect(float prev_delta, float curr_delta)
|
|||
return saturate(prev_delta / (prev_delta - curr_delta));
|
||||
}
|
||||
|
||||
void prepare_raycast(vec3 ray_origin, vec3 ray_dir, float thickness, out vec4 ss_step, out vec4 ss_ray, out float max_time)
|
||||
void prepare_raycast(
|
||||
vec3 ray_origin, vec3 ray_dir, float thickness, out vec4 ss_step, out vec4 ss_ray, out float max_time)
|
||||
{
|
||||
/* Negate the ray direction if it goes towards the camera.
|
||||
* This way we don't need to care if the projected point
|
||||
|
|
|
@ -7,4 +7,4 @@ void main()
|
|||
} else {
|
||||
gl_FragDepth = 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -131,7 +131,8 @@ static void ensure_deferred_shaders(WORKBENCH_PrivateData *wpd, int index, int d
|
|||
char *defines = workbench_material_build_defines(wpd, drawtype);
|
||||
char *composite_frag = workbench_build_composite_frag(wpd);
|
||||
char *prepass_frag = workbench_build_prepass_frag();
|
||||
e_data.prepass_sh_cache[index] = DRW_shader_create(datatoc_workbench_prepass_vert_glsl, NULL, prepass_frag, defines);
|
||||
e_data.prepass_sh_cache[index] = DRW_shader_create(
|
||||
datatoc_workbench_prepass_vert_glsl, NULL, prepass_frag, defines);
|
||||
if (drawtype == OB_SOLID) {
|
||||
e_data.composite_sh_cache[index] = DRW_shader_create_fullscreen(composite_frag, defines);
|
||||
}
|
||||
|
@ -208,13 +209,16 @@ void workbench_deferred_engine_init(WORKBENCH_Data *vedata)
|
|||
const int size[2] = {(int)viewport_size[0], (int)viewport_size[1]};
|
||||
e_data.object_id_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_R32UI, &draw_engine_workbench_solid);
|
||||
e_data.color_buffer_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_RGBA8, &draw_engine_workbench_solid);
|
||||
e_data.composite_buffer_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_RGBA16F, &draw_engine_workbench_solid);
|
||||
e_data.composite_buffer_tx = DRW_texture_pool_query_2D(
|
||||
size[0], size[1], GPU_RGBA16F, &draw_engine_workbench_solid);
|
||||
|
||||
if (NORMAL_ENCODING_ENABLED()) {
|
||||
e_data.normal_buffer_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_RG16, &draw_engine_workbench_solid);
|
||||
e_data.normal_buffer_tx = DRW_texture_pool_query_2D(
|
||||
size[0], size[1], GPU_RG16, &draw_engine_workbench_solid);
|
||||
}
|
||||
else {
|
||||
e_data.normal_buffer_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_RGBA32F, &draw_engine_workbench_solid);
|
||||
e_data.normal_buffer_tx = DRW_texture_pool_query_2D(
|
||||
size[0], size[1], GPU_RGBA32F, &draw_engine_workbench_solid);
|
||||
}
|
||||
|
||||
GPU_framebuffer_ensure_config(&fbl->prepass_fb, {
|
||||
|
@ -293,7 +297,8 @@ void workbench_deferred_cache_init(WORKBENCH_Data *vedata)
|
|||
e_data.display.shadow_shift = scene->display.shadow_shift;
|
||||
|
||||
if (SHADOW_ENABLED(wpd)) {
|
||||
psl->composite_pass = DRW_pass_create("Composite", DRW_STATE_WRITE_COLOR | DRW_STATE_STENCIL_EQUAL);
|
||||
psl->composite_pass = DRW_pass_create(
|
||||
"Composite", DRW_STATE_WRITE_COLOR | DRW_STATE_STENCIL_EQUAL);
|
||||
grp = DRW_shgroup_create(wpd->composite_sh, psl->composite_pass);
|
||||
workbench_composite_uniforms(wpd, grp);
|
||||
DRW_shgroup_stencil_mask(grp, 0x00);
|
||||
|
@ -304,24 +309,31 @@ void workbench_deferred_cache_init(WORKBENCH_Data *vedata)
|
|||
DRW_shgroup_call_add(grp, DRW_cache_fullscreen_quad_get(), NULL);
|
||||
|
||||
#ifdef DEBUG_SHADOW_VOLUME
|
||||
psl->shadow_depth_pass_pass = DRW_pass_create("Shadow Debug Pass", DRW_STATE_DEPTH_LESS | DRW_STATE_WRITE_COLOR | DRW_STATE_ADDITIVE);
|
||||
psl->shadow_depth_pass_pass = DRW_pass_create(
|
||||
"Shadow Debug Pass", DRW_STATE_DEPTH_LESS | DRW_STATE_WRITE_COLOR | DRW_STATE_ADDITIVE);
|
||||
grp = DRW_shgroup_create(e_data.shadow_pass_sh, psl->shadow_depth_pass_pass);
|
||||
psl->shadow_depth_fail_pass = DRW_pass_create("Shadow Debug Fail", DRW_STATE_DEPTH_GREATER_EQUAL | DRW_STATE_WRITE_COLOR | DRW_STATE_ADDITIVE);
|
||||
psl->shadow_depth_fail_pass = DRW_pass_create(
|
||||
"Shadow Debug Fail", DRW_STATE_DEPTH_GREATER_EQUAL | DRW_STATE_WRITE_COLOR | DRW_STATE_ADDITIVE);
|
||||
grp = DRW_shgroup_create(e_data.shadow_fail_sh, psl->shadow_depth_fail_pass);
|
||||
psl->shadow_depth_fail_caps_pass = DRW_pass_create("Shadow Depth Fail Caps", DRW_STATE_DEPTH_GREATER_EQUAL | DRW_STATE_WRITE_COLOR | DRW_STATE_ADDITIVE);
|
||||
psl->shadow_depth_fail_caps_pass = DRW_pass_create(
|
||||
"Shadow Depth Fail Caps", DRW_STATE_DEPTH_GREATER_EQUAL | DRW_STATE_WRITE_COLOR | DRW_STATE_ADDITIVE);
|
||||
grp = DRW_shgroup_create(e_data.shadow_caps_sh, psl->shadow_depth_fail_caps_pass);
|
||||
#else
|
||||
psl->shadow_depth_pass_pass = DRW_pass_create("Shadow Depth Pass", DRW_STATE_DEPTH_LESS | DRW_STATE_WRITE_STENCIL_SHADOW_PASS);
|
||||
psl->shadow_depth_pass_pass = DRW_pass_create(
|
||||
"Shadow Depth Pass", DRW_STATE_DEPTH_LESS | DRW_STATE_WRITE_STENCIL_SHADOW_PASS);
|
||||
grp = DRW_shgroup_create(e_data.shadow_pass_sh, psl->shadow_depth_pass_pass);
|
||||
DRW_shgroup_stencil_mask(grp, 0xFF);
|
||||
psl->shadow_depth_fail_pass = DRW_pass_create("Shadow Depth Fail", DRW_STATE_DEPTH_LESS | DRW_STATE_WRITE_STENCIL_SHADOW_FAIL);
|
||||
psl->shadow_depth_fail_pass = DRW_pass_create(
|
||||
"Shadow Depth Fail", DRW_STATE_DEPTH_LESS | DRW_STATE_WRITE_STENCIL_SHADOW_FAIL);
|
||||
grp = DRW_shgroup_create(e_data.shadow_fail_sh, psl->shadow_depth_fail_pass);
|
||||
DRW_shgroup_stencil_mask(grp, 0xFF);
|
||||
psl->shadow_depth_fail_caps_pass = DRW_pass_create("Shadow Depth Fail Caps", DRW_STATE_DEPTH_LESS | DRW_STATE_WRITE_STENCIL_SHADOW_FAIL);
|
||||
psl->shadow_depth_fail_caps_pass = DRW_pass_create(
|
||||
"Shadow Depth Fail Caps", DRW_STATE_DEPTH_LESS | DRW_STATE_WRITE_STENCIL_SHADOW_FAIL);
|
||||
grp = DRW_shgroup_create(e_data.shadow_caps_sh, psl->shadow_depth_fail_caps_pass);
|
||||
DRW_shgroup_stencil_mask(grp, 0xFF);
|
||||
|
||||
psl->composite_shadow_pass = DRW_pass_create("Composite Shadow", DRW_STATE_WRITE_COLOR | DRW_STATE_STENCIL_NEQUAL);
|
||||
psl->composite_shadow_pass = DRW_pass_create(
|
||||
"Composite Shadow", DRW_STATE_WRITE_COLOR | DRW_STATE_STENCIL_NEQUAL);
|
||||
grp = DRW_shgroup_create(wpd->composite_sh, psl->composite_shadow_pass);
|
||||
DRW_shgroup_stencil_mask(grp, 0x00);
|
||||
workbench_composite_uniforms(wpd, grp);
|
||||
|
@ -333,14 +345,16 @@ void workbench_deferred_cache_init(WORKBENCH_Data *vedata)
|
|||
#endif
|
||||
}
|
||||
else {
|
||||
psl->composite_pass = DRW_pass_create("Composite", DRW_STATE_WRITE_COLOR);
|
||||
psl->composite_pass = DRW_pass_create(
|
||||
"Composite", DRW_STATE_WRITE_COLOR);
|
||||
grp = DRW_shgroup_create(wpd->composite_sh, psl->composite_pass);
|
||||
workbench_composite_uniforms(wpd, grp);
|
||||
DRW_shgroup_call_add(grp, DRW_cache_fullscreen_quad_get(), NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
static WORKBENCH_MaterialData *get_or_create_material_data(WORKBENCH_Data *vedata, Object *ob, Material *mat, Image *ima, int drawtype)
|
||||
static WORKBENCH_MaterialData *get_or_create_material_data(
|
||||
WORKBENCH_Data *vedata, Object *ob, Material *mat, Image *ima, int drawtype)
|
||||
{
|
||||
WORKBENCH_StorageList *stl = vedata->stl;
|
||||
WORKBENCH_PassList *psl = vedata->psl;
|
||||
|
@ -360,7 +374,8 @@ static WORKBENCH_MaterialData *get_or_create_material_data(WORKBENCH_Data *vedat
|
|||
material = BLI_ghash_lookup(wpd->material_hash, SET_UINT_IN_POINTER(hash));
|
||||
if (material == NULL) {
|
||||
material = MEM_mallocN(sizeof(WORKBENCH_MaterialData), __func__);
|
||||
material->shgrp = DRW_shgroup_create(drawtype == OB_SOLID ? wpd->prepass_solid_sh : wpd->prepass_texture_sh, psl->prepass_pass);
|
||||
material->shgrp = DRW_shgroup_create(
|
||||
drawtype == OB_SOLID ? wpd->prepass_solid_sh : wpd->prepass_texture_sh, psl->prepass_pass);
|
||||
DRW_shgroup_stencil_mask(material->shgrp, 0xFF);
|
||||
material->object_id = engine_object_data->object_id;
|
||||
copy_v4_v4(material->color, material_template.color);
|
||||
|
@ -474,7 +489,8 @@ void workbench_deferred_solid_cache_populate(WORKBENCH_Data *vedata, Object *ob)
|
|||
gpumat_array[i] = NULL;
|
||||
}
|
||||
|
||||
struct Gwn_Batch **mat_geom = DRW_cache_object_surface_material_get(ob, gpumat_array, materials_len, NULL, NULL, NULL);
|
||||
struct Gwn_Batch **mat_geom = DRW_cache_object_surface_material_get(
|
||||
ob, gpumat_array, materials_len, NULL, NULL, NULL);
|
||||
if (mat_geom) {
|
||||
for (int i = 0; i < materials_len; ++i) {
|
||||
Material *mat = give_current_material(ob, i + 1);
|
||||
|
|
|
@ -150,7 +150,8 @@ static void workbench_init_object_data(ObjectEngineData *engine_data)
|
|||
data->object_id = e_data.next_object_id++;
|
||||
}
|
||||
|
||||
static WORKBENCH_MaterialData *get_or_create_material_data(WORKBENCH_Data *vedata, Object *ob, Material *mat, Image *ima, int drawtype)
|
||||
static WORKBENCH_MaterialData *get_or_create_material_data(
|
||||
WORKBENCH_Data *vedata, Object *ob, Material *mat, Image *ima, int drawtype)
|
||||
{
|
||||
WORKBENCH_StorageList *stl = vedata->stl;
|
||||
WORKBENCH_PassList *psl = vedata->psl;
|
||||
|
@ -173,7 +174,9 @@ static WORKBENCH_MaterialData *get_or_create_material_data(WORKBENCH_Data *vedat
|
|||
material = MEM_mallocN(sizeof(WORKBENCH_MaterialData), __func__);
|
||||
|
||||
/* transparent accum */
|
||||
grp = DRW_shgroup_create(drawtype == OB_SOLID ? wpd->transparent_accum_sh : wpd->transparent_accum_texture_sh, psl->transparent_accum_pass);
|
||||
grp = DRW_shgroup_create(
|
||||
drawtype == OB_SOLID ? wpd->transparent_accum_sh : wpd->transparent_accum_texture_sh,
|
||||
psl->transparent_accum_pass);
|
||||
DRW_shgroup_uniform_block(grp, "world_block", wpd->world_ubo);
|
||||
workbench_material_set_normal_world_matrix(grp, wpd, e_data.normal_world_matrix);
|
||||
copy_v4_v4(material->color, material_template.color);
|
||||
|
@ -213,7 +216,8 @@ static void ensure_forward_shaders(WORKBENCH_PrivateData *wpd, int index, int dr
|
|||
if (e_data.transparent_accum_sh_cache[index] == NULL) {
|
||||
char *defines = workbench_material_build_defines(wpd, drawtype);
|
||||
char *transparent_accum_frag = workbench_build_forward_transparent_accum_frag();
|
||||
e_data.transparent_accum_sh_cache[index] = DRW_shader_create(datatoc_workbench_prepass_vert_glsl, NULL, transparent_accum_frag, defines);
|
||||
e_data.transparent_accum_sh_cache[index] = DRW_shader_create(
|
||||
datatoc_workbench_prepass_vert_glsl, NULL, transparent_accum_frag, defines);
|
||||
MEM_freeN(transparent_accum_frag);
|
||||
|
||||
MEM_freeN(defines);
|
||||
|
@ -256,16 +260,19 @@ void workbench_forward_engine_init(WORKBENCH_Data *vedata)
|
|||
|
||||
char *defines = workbench_material_build_defines(wpd, OB_SOLID);
|
||||
char *forward_depth_frag = workbench_build_forward_depth_frag();
|
||||
e_data.object_outline_sh = DRW_shader_create(datatoc_workbench_prepass_vert_glsl, NULL, forward_depth_frag, defines);
|
||||
e_data.object_outline_sh = DRW_shader_create(
|
||||
datatoc_workbench_prepass_vert_glsl, NULL, forward_depth_frag, defines);
|
||||
|
||||
#ifdef WORKBENCH_REVEALAGE_ENABLED
|
||||
char *forward_transparent_revealage_frag = workbench_build_forward_transparent_revealage_frag();
|
||||
e_data.transparent_revealage_sh = DRW_shader_create(datatoc_workbench_prepass_vert_glsl, NULL, forward_transparent_revealage_frag, defines);
|
||||
e_data.transparent_revealage_sh = DRW_shader_create(
|
||||
datatoc_workbench_prepass_vert_glsl, NULL, forward_transparent_revealage_frag, defines);
|
||||
MEM_freeN(forward_transparent_revealage_frag);
|
||||
#endif
|
||||
|
||||
e_data.depth_sh = DRW_shader_create_3D_depth_only();
|
||||
e_data.checker_depth_sh = DRW_shader_create_fullscreen(datatoc_workbench_checkerboard_depth_frag_glsl, NULL);
|
||||
e_data.checker_depth_sh = DRW_shader_create_fullscreen(
|
||||
datatoc_workbench_checkerboard_depth_frag_glsl, NULL);
|
||||
MEM_freeN(forward_depth_frag);
|
||||
MEM_freeN(defines);
|
||||
}
|
||||
|
@ -274,12 +281,16 @@ void workbench_forward_engine_init(WORKBENCH_Data *vedata)
|
|||
const float *viewport_size = DRW_viewport_size_get();
|
||||
const int size[2] = {(int)viewport_size[0], (int)viewport_size[1]};
|
||||
|
||||
e_data.object_id_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_R32UI, &draw_engine_workbench_transparent);
|
||||
e_data.transparent_accum_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_RGBA16F, &draw_engine_workbench_transparent);
|
||||
e_data.object_id_tx = DRW_texture_pool_query_2D(
|
||||
size[0], size[1], GPU_R32UI, &draw_engine_workbench_transparent);
|
||||
e_data.transparent_accum_tx = DRW_texture_pool_query_2D(
|
||||
size[0], size[1], GPU_RGBA16F, &draw_engine_workbench_transparent);
|
||||
#ifdef WORKBENCH_REVEALAGE_ENABLED
|
||||
e_data.transparent_revealage_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_R16F, &draw_engine_workbench_transparent);
|
||||
e_data.transparent_revealage_tx = DRW_texture_pool_query_2D(
|
||||
size[0], size[1], GPU_R16F, &draw_engine_workbench_transparent);
|
||||
#endif
|
||||
e_data.composite_buffer_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_RGBA16F, &draw_engine_workbench_transparent);
|
||||
e_data.composite_buffer_tx = DRW_texture_pool_query_2D(
|
||||
size[0], size[1], GPU_RGBA16F, &draw_engine_workbench_transparent);
|
||||
GPU_framebuffer_ensure_config(&fbl->object_outline_fb, {
|
||||
GPU_ATTACHMENT_TEXTURE(dtxl->depth),
|
||||
GPU_ATTACHMENT_TEXTURE(e_data.object_id_tx),
|
||||
|
@ -486,7 +497,8 @@ void workbench_forward_cache_populate(WORKBENCH_Data *vedata, Object *ob)
|
|||
gpumat_array[i] = NULL;
|
||||
}
|
||||
|
||||
struct Gwn_Batch **mat_geom = DRW_cache_object_surface_material_get(ob, gpumat_array, materials_len, NULL, NULL, NULL);
|
||||
struct Gwn_Batch **mat_geom = DRW_cache_object_surface_material_get(
|
||||
ob, gpumat_array, materials_len, NULL, NULL, NULL);
|
||||
if (mat_geom) {
|
||||
for (int i = 0; i < materials_len; ++i) {
|
||||
Material *mat = give_current_material(ob, i + 1);
|
||||
|
|
|
@ -121,7 +121,8 @@ int workbench_material_get_shader_index(WORKBENCH_PrivateData *wpd, int drawtype
|
|||
return index;
|
||||
}
|
||||
|
||||
void workbench_material_set_normal_world_matrix(DRWShadingGroup *grp, WORKBENCH_PrivateData *wpd, float persistent_matrix[3][3])
|
||||
void workbench_material_set_normal_world_matrix(
|
||||
DRWShadingGroup *grp, WORKBENCH_PrivateData *wpd, float persistent_matrix[3][3])
|
||||
{
|
||||
if (STUDIOLIGHT_ORIENTATION_WORLD_ENABLED(wpd)) {
|
||||
float view_matrix_inverse[4][4];
|
||||
|
|
|
@ -121,7 +121,7 @@ typedef struct WORKBENCH_PrivateData {
|
|||
struct DRWShadingGroup *depth_shgrp;
|
||||
#ifdef WORKBENCH_REVEALAGE_ENABLED
|
||||
struct DRWShadingGroup *transparent_revealage_shgrp;
|
||||
#endif
|
||||
#endif
|
||||
WORKBENCH_UBO_World world_data;
|
||||
float shadow_multiplier;
|
||||
} WORKBENCH_PrivateData; /* Transient data */
|
||||
|
@ -183,7 +183,8 @@ char *workbench_material_build_defines(WORKBENCH_PrivateData *wpd, int drawtype)
|
|||
void workbench_material_get_solid_color(WORKBENCH_PrivateData *wpd, Object *ob, Material *mat, float *color);
|
||||
uint workbench_material_get_hash(WORKBENCH_MaterialData *material_template);
|
||||
int workbench_material_get_shader_index(WORKBENCH_PrivateData *wpd, int drawtype);
|
||||
void workbench_material_set_normal_world_matrix(DRWShadingGroup *grp, WORKBENCH_PrivateData *wpd, float persistent_matrix[3][3]);
|
||||
void workbench_material_set_normal_world_matrix(
|
||||
DRWShadingGroup *grp, WORKBENCH_PrivateData *wpd, float persistent_matrix[3][3]);
|
||||
|
||||
/* workbench_studiolight.c */
|
||||
void studiolight_update_world(StudioLight *sl, WORKBENCH_UBO_World *wd);
|
||||
|
|
|
@ -152,7 +152,9 @@ typedef struct DrawEngineType {
|
|||
void (*view_update)(void *vedata);
|
||||
void (*id_update)(void *vedata, struct ID *id);
|
||||
|
||||
void (*render_to_image)(void *vedata, struct RenderEngine *engine, struct RenderLayer *layer, const struct rcti *rect);
|
||||
void (*render_to_image)(
|
||||
void *vedata, struct RenderEngine *engine,
|
||||
struct RenderLayer *layer, const struct rcti *rect);
|
||||
} DrawEngineType;
|
||||
|
||||
#ifndef __DRW_ENGINE_H__
|
||||
|
@ -318,10 +320,14 @@ DRWShadingGroup *DRW_shgroup_material_empty_tri_batch_create(struct GPUMaterial
|
|||
DRWShadingGroup *DRW_shgroup_instance_create(
|
||||
struct GPUShader *shader, DRWPass *pass, struct Gwn_Batch *geom, struct Gwn_VertFormat *format);
|
||||
DRWShadingGroup *DRW_shgroup_point_batch_create(struct GPUShader *shader, DRWPass *pass);
|
||||
DRWShadingGroup *DRW_shgroup_line_batch_create_with_format(struct GPUShader *shader, DRWPass *pass, struct Gwn_VertFormat *format);
|
||||
DRWShadingGroup *DRW_shgroup_line_batch_create(struct GPUShader *shader, DRWPass *pass);
|
||||
DRWShadingGroup *DRW_shgroup_empty_tri_batch_create(struct GPUShader *shader, DRWPass *pass, int size);
|
||||
DRWShadingGroup *DRW_shgroup_transform_feedback_create(struct GPUShader *shader, DRWPass *pass, struct Gwn_VertBuf *tf_target);
|
||||
DRWShadingGroup *DRW_shgroup_line_batch_create_with_format(
|
||||
struct GPUShader *shader, DRWPass *pass, struct Gwn_VertFormat *format);
|
||||
DRWShadingGroup *DRW_shgroup_line_batch_create(
|
||||
struct GPUShader *shader, DRWPass *pass);
|
||||
DRWShadingGroup *DRW_shgroup_empty_tri_batch_create(
|
||||
struct GPUShader *shader, DRWPass *pass, int size);
|
||||
DRWShadingGroup *DRW_shgroup_transform_feedback_create(
|
||||
struct GPUShader *shader, DRWPass *pass, struct Gwn_VertBuf *tf_target);
|
||||
|
||||
typedef void (DRWCallGenerateFn)(
|
||||
DRWShadingGroup *shgroup,
|
||||
|
@ -440,8 +446,10 @@ void DRW_render_instance_buffer_finish(void);
|
|||
|
||||
/* ViewLayers */
|
||||
void *DRW_view_layer_engine_data_get(DrawEngineType *engine_type);
|
||||
void **DRW_view_layer_engine_data_ensure_ex(struct ViewLayer *view_layer, DrawEngineType *engine_type, void (*callback)(void *storage));
|
||||
void **DRW_view_layer_engine_data_ensure(DrawEngineType *engine_type, void (*callback)(void *storage));
|
||||
void **DRW_view_layer_engine_data_ensure_ex(
|
||||
struct ViewLayer *view_layer, DrawEngineType *engine_type, void (*callback)(void *storage));
|
||||
void **DRW_view_layer_engine_data_ensure(
|
||||
DrawEngineType *engine_type, void (*callback)(void *storage));
|
||||
|
||||
/* Objects */
|
||||
ObjectEngineData *DRW_object_engine_data_get(Object *ob, DrawEngineType *engine_type);
|
||||
|
|
|
@ -373,7 +373,8 @@ static void drw_shgroup_bone_axes(const float (*bone_mat)[4], const float color[
|
|||
static void drw_shgroup_bone_relationship_lines(const float start[3], const float end[3])
|
||||
{
|
||||
if (g_data.lines_relationship == NULL) {
|
||||
g_data.lines_relationship = shgroup_dynlines_dashed_uniform_color(g_data.passes.relationship_lines, g_theme.wire_color);
|
||||
g_data.lines_relationship = shgroup_dynlines_dashed_uniform_color(
|
||||
g_data.passes.relationship_lines, g_theme.wire_color);
|
||||
}
|
||||
/* reverse order to have less stipple overlap */
|
||||
float v[3];
|
||||
|
@ -956,7 +957,8 @@ static void ebone_spline_preview(EditBone *ebone, float result_array[MAX_BBONE_S
|
|||
|
||||
size_to_mat4(bscalemat, bscale);
|
||||
|
||||
/* Note: don't multiply by inverse scale mat here, as it causes problems with scaling shearing and breaking segment chains */
|
||||
/* Note: don't multiply by inverse scale mat here,
|
||||
* as it causes problems with scaling shearing and breaking segment chains */
|
||||
mul_m4_series(result_array[a], result_array[a], bscalemat);
|
||||
}
|
||||
}
|
||||
|
@ -1055,7 +1057,8 @@ static void draw_axes(EditBone *eBone, bPoseChannel *pchan)
|
|||
const float *col = (g_theme.const_color) ? g_theme.const_color :
|
||||
(BONE_FLAG(eBone, pchan) & BONE_SELECTED) ? g_theme.text_hi_color : g_theme.text_color;
|
||||
copy_v4_v4(final_col, col);
|
||||
final_col[3] = (g_theme.const_color) ? 1.0 : (BONE_FLAG(eBone, pchan) & BONE_SELECTED) ? 0.3 : 0.8; /* Mix with axes color. */
|
||||
/* Mix with axes color. */
|
||||
final_col[3] = (g_theme.const_color) ? 1.0 : (BONE_FLAG(eBone, pchan) & BONE_SELECTED) ? 0.3 : 0.8;
|
||||
drw_shgroup_bone_axes(BONE_VAR(eBone, pchan, disp_mat), final_col);
|
||||
}
|
||||
|
||||
|
@ -1107,8 +1110,9 @@ static void draw_points(
|
|||
if (eBone) {
|
||||
if (!((eBone->parent) && !EBONE_VISIBLE(arm, eBone->parent))) {
|
||||
if (is_envelope_draw) {
|
||||
drw_shgroup_bone_envelope(eBone->disp_mat, col_solid_root, col_hint_root, col_wire_root,
|
||||
&eBone->rad_head, &envelope_ignore);
|
||||
drw_shgroup_bone_envelope(
|
||||
eBone->disp_mat, col_solid_root, col_hint_root, col_wire_root,
|
||||
&eBone->rad_head, &envelope_ignore);
|
||||
}
|
||||
else {
|
||||
drw_shgroup_bone_point(eBone->disp_mat, col_solid_root, col_hint_root, col_wire_root);
|
||||
|
@ -1119,8 +1123,9 @@ static void draw_points(
|
|||
Bone *bone = pchan->bone;
|
||||
if (!((bone->parent) && (bone->parent->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)))) {
|
||||
if (is_envelope_draw) {
|
||||
drw_shgroup_bone_envelope(pchan->disp_mat, col_solid_root, col_hint_root, col_wire_root,
|
||||
&bone->rad_head, &envelope_ignore);
|
||||
drw_shgroup_bone_envelope(
|
||||
pchan->disp_mat, col_solid_root, col_hint_root, col_wire_root,
|
||||
&bone->rad_head, &envelope_ignore);
|
||||
}
|
||||
else {
|
||||
drw_shgroup_bone_point(pchan->disp_mat, col_solid_root, col_hint_root, col_wire_root);
|
||||
|
@ -1137,7 +1142,8 @@ static void draw_points(
|
|||
if (is_envelope_draw) {
|
||||
const float *rad_tail = eBone ? &eBone->rad_tail : &pchan->bone->rad_tail;
|
||||
drw_shgroup_bone_envelope(
|
||||
BONE_VAR(eBone, pchan, disp_mat), col_solid_tail, col_hint_tail, col_wire_tail, &envelope_ignore, rad_tail);
|
||||
BONE_VAR(eBone, pchan, disp_mat), col_solid_tail, col_hint_tail, col_wire_tail,
|
||||
&envelope_ignore, rad_tail);
|
||||
}
|
||||
else {
|
||||
drw_shgroup_bone_point(BONE_VAR(eBone, pchan, disp_tail_mat), col_solid_tail, col_hint_tail, col_wire_tail);
|
||||
|
@ -1211,7 +1217,9 @@ static void draw_bone_envelope(
|
|||
DRW_select_load_id(select_id | BONESEL_BONE);
|
||||
}
|
||||
|
||||
drw_shgroup_bone_envelope(BONE_VAR(eBone, pchan, disp_mat), col_solid, col_hint, col_wire, rad_head, rad_tail);
|
||||
drw_shgroup_bone_envelope(
|
||||
BONE_VAR(eBone, pchan, disp_mat), col_solid, col_hint, col_wire,
|
||||
rad_head, rad_tail);
|
||||
|
||||
if (select_id != -1) {
|
||||
DRW_select_load_id(-1);
|
||||
|
|
|
@ -2046,9 +2046,9 @@ Gwn_Batch *DRW_cache_bone_point_wire_outline_get(void)
|
|||
for (int a = 0; a < CIRCLE_RESOL; a++) {
|
||||
v1[0] = radius * sinf((2.0f * M_PI * a) / ((float)CIRCLE_RESOL));
|
||||
v1[1] = radius * cosf((2.0f * M_PI * a) / ((float)CIRCLE_RESOL));
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos0, v , v0);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos0, v, v0);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos1, v++, v1);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos0, v , v0);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos0, v, v0);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos1, v++, v1);
|
||||
copy_v2_v2(v0, v1);
|
||||
}
|
||||
|
|
|
@ -167,11 +167,16 @@ struct Gwn_Batch *DRW_cache_lattice_wire_get(struct Object *ob, bool use_weight)
|
|||
struct Gwn_Batch *DRW_cache_lattice_vert_overlay_get(struct Object *ob);
|
||||
|
||||
/* Particles */
|
||||
struct Gwn_Batch *DRW_cache_particles_get_hair(struct Object *object, struct ParticleSystem *psys, struct ModifierData *md);
|
||||
struct Gwn_Batch *DRW_cache_particles_get_dots(struct Object *object, struct ParticleSystem *psys);
|
||||
struct Gwn_Batch *DRW_cache_particles_get_edit_strands(struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
|
||||
struct Gwn_Batch *DRW_cache_particles_get_edit_inner_points(struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
|
||||
struct Gwn_Batch *DRW_cache_particles_get_edit_tip_points(struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
|
||||
struct Gwn_Batch *DRW_cache_particles_get_hair(
|
||||
struct Object *object, struct ParticleSystem *psys, struct ModifierData *md);
|
||||
struct Gwn_Batch *DRW_cache_particles_get_dots(
|
||||
struct Object *object, struct ParticleSystem *psys);
|
||||
struct Gwn_Batch *DRW_cache_particles_get_edit_strands(
|
||||
struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
|
||||
struct Gwn_Batch *DRW_cache_particles_get_edit_inner_points(
|
||||
struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
|
||||
struct Gwn_Batch *DRW_cache_particles_get_edit_tip_points(
|
||||
struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
|
||||
struct Gwn_Batch *DRW_cache_particles_get_prim(int type);
|
||||
|
||||
/* Metaball */
|
||||
|
|
|
@ -64,7 +64,8 @@ struct Gwn_Batch *DRW_curve_batch_cache_get_normal_edge(
|
|||
struct Gwn_Batch *DRW_curve_batch_cache_get_overlay_edges(struct Curve *cu);
|
||||
struct Gwn_Batch *DRW_curve_batch_cache_get_overlay_verts(struct Curve *cu);
|
||||
|
||||
struct Gwn_Batch *DRW_curve_batch_cache_get_triangles_with_normals(struct Curve *cu, struct CurveCache *ob_curve_cache);
|
||||
struct Gwn_Batch *DRW_curve_batch_cache_get_triangles_with_normals(
|
||||
struct Curve *cu, struct CurveCache *ob_curve_cache);
|
||||
struct Gwn_Batch **DRW_curve_batch_cache_get_surface_shaded(
|
||||
struct Curve *cu, struct CurveCache *ob_curve_cache,
|
||||
struct GPUMaterial **gpumat_array, uint gpumat_array_len);
|
||||
|
@ -124,10 +125,15 @@ struct Gwn_Batch *DRW_mesh_batch_cache_get_verts_with_select_id(struct Mesh *me,
|
|||
void DRW_mesh_cache_sculpt_coords_ensure(struct Mesh *me);
|
||||
|
||||
/* Particles */
|
||||
struct Gwn_Batch *DRW_particles_batch_cache_get_hair(struct Object *object, struct ParticleSystem *psys, struct ModifierData *md);
|
||||
struct Gwn_Batch *DRW_particles_batch_cache_get_dots(struct Object *object, struct ParticleSystem *psys);
|
||||
struct Gwn_Batch *DRW_particles_batch_cache_get_edit_strands(struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
|
||||
struct Gwn_Batch *DRW_particles_batch_cache_get_edit_inner_points(struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
|
||||
struct Gwn_Batch *DRW_particles_batch_cache_get_edit_tip_points(struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
|
||||
struct Gwn_Batch *DRW_particles_batch_cache_get_hair(
|
||||
struct Object *object, struct ParticleSystem *psys, struct ModifierData *md);
|
||||
struct Gwn_Batch *DRW_particles_batch_cache_get_dots(
|
||||
struct Object *object, struct ParticleSystem *psys);
|
||||
struct Gwn_Batch *DRW_particles_batch_cache_get_edit_strands(
|
||||
struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
|
||||
struct Gwn_Batch *DRW_particles_batch_cache_get_edit_inner_points(
|
||||
struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
|
||||
struct Gwn_Batch *DRW_particles_batch_cache_get_edit_tip_points(
|
||||
struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
|
||||
|
||||
#endif /* __DRAW_CACHE_IMPL_H__ */
|
||||
|
|
|
@ -176,7 +176,8 @@ Gwn_IndexBuf *DRW_displist_indexbuf_calc_triangles_in_order(ListBase *lb)
|
|||
|
||||
Gwn_IndexBuf **DRW_displist_indexbuf_calc_triangles_in_order_split_by_material(ListBase *lb, uint gpumat_array_len)
|
||||
{
|
||||
Gwn_IndexBuf **shaded_triangles_in_order = MEM_callocN(sizeof(*shaded_triangles_in_order) * gpumat_array_len, __func__);
|
||||
Gwn_IndexBuf **shaded_triangles_in_order = MEM_callocN(
|
||||
sizeof(*shaded_triangles_in_order) * gpumat_array_len, __func__);
|
||||
Gwn_IndexBufBuilder *elb = BLI_array_alloca(elb, gpumat_array_len);
|
||||
|
||||
const int tri_len = curve_render_surface_tri_len_get(lb);
|
||||
|
|
|
@ -1953,7 +1953,8 @@ static Gwn_VertBuf *mesh_batch_cache_get_tri_shading_data(MeshRenderData *rdata,
|
|||
GWN_vertformat_alias_add(format, attrib_name);
|
||||
|
||||
/* +1 include null terminator. */
|
||||
auto_ofs += 1 + BLI_snprintf_rlen(cache->auto_layer_names + auto_ofs, auto_names_len - auto_ofs, "b%s", attrib_name);
|
||||
auto_ofs += 1 + BLI_snprintf_rlen(
|
||||
cache->auto_layer_names + auto_ofs, auto_names_len - auto_ofs, "b%s", attrib_name);
|
||||
cache->auto_layer_is_srgb[auto_id++] = 0; /* tag as not srgb */
|
||||
|
||||
if (i == rdata->cd.layers.uv_active) {
|
||||
|
@ -1988,7 +1989,8 @@ static Gwn_VertBuf *mesh_batch_cache_get_tri_shading_data(MeshRenderData *rdata,
|
|||
GWN_vertformat_alias_add(format, attrib_name);
|
||||
|
||||
/* +1 include null terminator. */
|
||||
auto_ofs += 1 + BLI_snprintf_rlen(cache->auto_layer_names + auto_ofs, auto_names_len - auto_ofs, "b%s", attrib_name);
|
||||
auto_ofs += 1 + BLI_snprintf_rlen(
|
||||
cache->auto_layer_names + auto_ofs, auto_names_len - auto_ofs, "b%s", attrib_name);
|
||||
cache->auto_layer_is_srgb[auto_id++] = 1; /* tag as srgb */
|
||||
}
|
||||
|
||||
|
@ -3829,8 +3831,9 @@ Gwn_Batch *DRW_mesh_batch_cache_get_edge_detection(Mesh *me)
|
|||
|
||||
MeshRenderData *rdata = mesh_render_data_create(me, options);
|
||||
|
||||
cache->edge_detection = GWN_batch_create_ex(GWN_PRIM_LINES_ADJ, mesh_batch_cache_get_vert_pos_and_nor_in_order(rdata, cache),
|
||||
mesh_batch_cache_get_edges_adjacency(rdata, cache), 0);
|
||||
cache->edge_detection = GWN_batch_create_ex(
|
||||
GWN_PRIM_LINES_ADJ, mesh_batch_cache_get_vert_pos_and_nor_in_order(rdata, cache),
|
||||
mesh_batch_cache_get_edges_adjacency(rdata, cache), 0);
|
||||
|
||||
mesh_render_data_free(rdata);
|
||||
}
|
||||
|
|
|
@ -599,7 +599,9 @@ static void particle_batch_cache_ensure_pos(Object *object,
|
|||
val = len_v3(pa->state.vel) / psys->part->color_vec_max;
|
||||
break;
|
||||
case PART_DRAW_COL_ACC:
|
||||
val = len_v3v3(pa->state.vel, pa->prev_state.vel) / ((pa->state.time - pa->prev_state.time) * psys->part->color_vec_max);
|
||||
val = len_v3v3(
|
||||
pa->state.vel,
|
||||
pa->prev_state.vel) / ((pa->state.time - pa->prev_state.time) * psys->part->color_vec_max);
|
||||
break;
|
||||
default:
|
||||
val = -1.0f;
|
||||
|
|
|
@ -224,8 +224,8 @@ DRWShadingGroup *shgroup_dynlines_flat_color(DRWPass *pass)
|
|||
GPUShader *sh = GPU_shader_get_builtin_shader(GPU_SHADER_3D_FLAT_COLOR);
|
||||
|
||||
DRW_shgroup_instance_format(g_formats.dynlines_color, {
|
||||
{"pos" , DRW_ATTRIB_FLOAT, 3},
|
||||
{"color" , DRW_ATTRIB_FLOAT, 4}
|
||||
{"pos", DRW_ATTRIB_FLOAT, 3},
|
||||
{"color", DRW_ATTRIB_FLOAT, 4}
|
||||
});
|
||||
|
||||
DRWShadingGroup *grp = DRW_shgroup_line_batch_create_with_format(sh, pass, g_formats.dynlines_color);
|
||||
|
@ -288,7 +288,7 @@ DRWShadingGroup *shgroup_instance_screenspace(DRWPass *pass, struct Gwn_Batch *g
|
|||
|
||||
DRW_shgroup_instance_format(g_formats.instance_screenspace, {
|
||||
{"world_pos", DRW_ATTRIB_FLOAT, 3},
|
||||
{"color" , DRW_ATTRIB_FLOAT, 3}
|
||||
{"color", DRW_ATTRIB_FLOAT, 3}
|
||||
});
|
||||
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(sh, pass, geom, g_formats.instance_screenspace);
|
||||
|
@ -307,7 +307,7 @@ DRWShadingGroup *shgroup_instance_solid(DRWPass *pass, struct Gwn_Batch *geom)
|
|||
|
||||
DRW_shgroup_instance_format(g_formats.instance_color, {
|
||||
{"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16},
|
||||
{"color" , DRW_ATTRIB_FLOAT, 4}
|
||||
{"color", DRW_ATTRIB_FLOAT, 4}
|
||||
});
|
||||
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(sh, pass, geom, g_formats.instance_color);
|
||||
|
@ -322,7 +322,7 @@ DRWShadingGroup *shgroup_instance_wire(DRWPass *pass, struct Gwn_Batch *geom)
|
|||
|
||||
DRW_shgroup_instance_format(g_formats.instance_color, {
|
||||
{"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16},
|
||||
{"color" , DRW_ATTRIB_FLOAT, 4}
|
||||
{"color", DRW_ATTRIB_FLOAT, 4}
|
||||
});
|
||||
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(sh, pass, geom, g_formats.instance_color);
|
||||
|
@ -335,8 +335,8 @@ DRWShadingGroup *shgroup_instance_screen_aligned(DRWPass *pass, struct Gwn_Batch
|
|||
GPUShader *sh = GPU_shader_get_builtin_shader(GPU_SHADER_3D_INSTANCE_SCREEN_ALIGNED);
|
||||
|
||||
DRW_shgroup_instance_format(g_formats.instance_screen_aligned, {
|
||||
{"color" , DRW_ATTRIB_FLOAT, 3},
|
||||
{"size" , DRW_ATTRIB_FLOAT, 1},
|
||||
{"color", DRW_ATTRIB_FLOAT, 3},
|
||||
{"size", DRW_ATTRIB_FLOAT, 1},
|
||||
{"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16}
|
||||
});
|
||||
|
||||
|
@ -351,8 +351,8 @@ DRWShadingGroup *shgroup_instance_axis_names(DRWPass *pass, struct Gwn_Batch *ge
|
|||
GPUShader *sh = GPU_shader_get_builtin_shader(GPU_SHADER_3D_INSTANCE_SCREEN_ALIGNED_AXIS);
|
||||
|
||||
DRW_shgroup_instance_format(g_formats.instance_screen_aligned, {
|
||||
{"color" , DRW_ATTRIB_FLOAT, 3},
|
||||
{"size" , DRW_ATTRIB_FLOAT, 1},
|
||||
{"color", DRW_ATTRIB_FLOAT, 3},
|
||||
{"size", DRW_ATTRIB_FLOAT, 1},
|
||||
{"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16}
|
||||
});
|
||||
|
||||
|
@ -367,8 +367,8 @@ DRWShadingGroup *shgroup_instance_scaled(DRWPass *pass, struct Gwn_Batch *geom)
|
|||
GPUShader *sh_inst = GPU_shader_get_builtin_shader(GPU_SHADER_INSTANCE_VARIYING_COLOR_VARIYING_SCALE);
|
||||
|
||||
DRW_shgroup_instance_format(g_formats.instance_scaled, {
|
||||
{"color" , DRW_ATTRIB_FLOAT, 3},
|
||||
{"size" , DRW_ATTRIB_FLOAT, 3},
|
||||
{"color", DRW_ATTRIB_FLOAT, 3},
|
||||
{"size", DRW_ATTRIB_FLOAT, 3},
|
||||
{"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16}
|
||||
});
|
||||
|
||||
|
@ -382,8 +382,8 @@ DRWShadingGroup *shgroup_instance(DRWPass *pass, struct Gwn_Batch *geom)
|
|||
GPUShader *sh_inst = GPU_shader_get_builtin_shader(GPU_SHADER_INSTANCE_VARIYING_COLOR_VARIYING_SIZE);
|
||||
|
||||
DRW_shgroup_instance_format(g_formats.instance_sized, {
|
||||
{"color" , DRW_ATTRIB_FLOAT, 3},
|
||||
{"size" , DRW_ATTRIB_FLOAT, 1},
|
||||
{"color", DRW_ATTRIB_FLOAT, 3},
|
||||
{"size", DRW_ATTRIB_FLOAT, 1},
|
||||
{"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16}
|
||||
});
|
||||
|
||||
|
@ -397,8 +397,8 @@ DRWShadingGroup *shgroup_instance_outline(DRWPass *pass, struct Gwn_Batch *geom,
|
|||
GPUShader *sh_inst = GPU_shader_get_builtin_shader(GPU_SHADER_INSTANCE_VARIYING_ID_VARIYING_SIZE);
|
||||
|
||||
DRW_shgroup_instance_format(g_formats.instance_outline, {
|
||||
{"callId" , DRW_ATTRIB_INT, 1},
|
||||
{"size" , DRW_ATTRIB_FLOAT, 1},
|
||||
{"callId", DRW_ATTRIB_INT, 1},
|
||||
{"size", DRW_ATTRIB_FLOAT, 1},
|
||||
{"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16}
|
||||
});
|
||||
|
||||
|
@ -413,10 +413,10 @@ DRWShadingGroup *shgroup_camera_instance(DRWPass *pass, struct Gwn_Batch *geom)
|
|||
GPUShader *sh_inst = GPU_shader_get_builtin_shader(GPU_SHADER_CAMERA);
|
||||
|
||||
DRW_shgroup_instance_format(g_formats.instance_camera, {
|
||||
{"color" , DRW_ATTRIB_FLOAT, 3},
|
||||
{"corners" , DRW_ATTRIB_FLOAT, 8},
|
||||
{"depth" , DRW_ATTRIB_FLOAT, 1},
|
||||
{"tria" , DRW_ATTRIB_FLOAT, 4},
|
||||
{"color", DRW_ATTRIB_FLOAT, 3},
|
||||
{"corners", DRW_ATTRIB_FLOAT, 8},
|
||||
{"depth", DRW_ATTRIB_FLOAT, 1},
|
||||
{"tria", DRW_ATTRIB_FLOAT, 4},
|
||||
{"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16}
|
||||
});
|
||||
|
||||
|
@ -431,9 +431,9 @@ DRWShadingGroup *shgroup_distance_lines_instance(DRWPass *pass, struct Gwn_Batch
|
|||
static float point_size = 4.0f;
|
||||
|
||||
DRW_shgroup_instance_format(g_formats.instance_distance_lines, {
|
||||
{"color" , DRW_ATTRIB_FLOAT, 3},
|
||||
{"start" , DRW_ATTRIB_FLOAT, 1},
|
||||
{"end" , DRW_ATTRIB_FLOAT, 1},
|
||||
{"color", DRW_ATTRIB_FLOAT, 3},
|
||||
{"start", DRW_ATTRIB_FLOAT, 1},
|
||||
{"end", DRW_ATTRIB_FLOAT, 1},
|
||||
{"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16}
|
||||
});
|
||||
|
||||
|
@ -450,7 +450,7 @@ DRWShadingGroup *shgroup_spot_instance(DRWPass *pass, struct Gwn_Batch *geom)
|
|||
static const int False = false;
|
||||
|
||||
DRW_shgroup_instance_format(g_formats.instance_spot, {
|
||||
{"color" , DRW_ATTRIB_FLOAT, 3},
|
||||
{"color", DRW_ATTRIB_FLOAT, 3},
|
||||
{"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16}
|
||||
});
|
||||
|
||||
|
@ -472,12 +472,13 @@ DRWShadingGroup *shgroup_instance_bone_axes(DRWPass *pass)
|
|||
|
||||
DRW_shgroup_instance_format(g_formats.instance_color, {
|
||||
{"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16},
|
||||
{"color" , DRW_ATTRIB_FLOAT, 4}
|
||||
{"color", DRW_ATTRIB_FLOAT, 4}
|
||||
});
|
||||
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(g_shaders.bone_axes,
|
||||
pass, DRW_cache_bone_arrows_get(),
|
||||
g_formats.instance_color);
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(
|
||||
g_shaders.bone_axes,
|
||||
pass, DRW_cache_bone_arrows_get(),
|
||||
g_formats.instance_color);
|
||||
DRW_shgroup_uniform_vec3(grp, "screenVecs[0]", DRW_viewport_screenvecs_get(), 2);
|
||||
|
||||
return grp;
|
||||
|
@ -492,15 +493,16 @@ DRWShadingGroup *shgroup_instance_bone_envelope_outline(DRWPass *pass)
|
|||
}
|
||||
|
||||
DRW_shgroup_instance_format(g_formats.instance_bone_envelope_outline, {
|
||||
{"headSphere" , DRW_ATTRIB_FLOAT, 4},
|
||||
{"tailSphere" , DRW_ATTRIB_FLOAT, 4},
|
||||
{"outlineColorSize" , DRW_ATTRIB_FLOAT, 4},
|
||||
{"xAxis" , DRW_ATTRIB_FLOAT, 3}
|
||||
{"headSphere", DRW_ATTRIB_FLOAT, 4},
|
||||
{"tailSphere", DRW_ATTRIB_FLOAT, 4},
|
||||
{"outlineColorSize", DRW_ATTRIB_FLOAT, 4},
|
||||
{"xAxis", DRW_ATTRIB_FLOAT, 3}
|
||||
});
|
||||
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(g_shaders.bone_envelope_outline,
|
||||
pass, DRW_cache_bone_envelope_outline_get(),
|
||||
g_formats.instance_bone_envelope_outline);
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(
|
||||
g_shaders.bone_envelope_outline,
|
||||
pass, DRW_cache_bone_envelope_outline_get(),
|
||||
g_formats.instance_bone_envelope_outline);
|
||||
DRW_shgroup_uniform_vec2(grp, "viewportSize", DRW_viewport_size_get(), 1);
|
||||
|
||||
return grp;
|
||||
|
@ -515,14 +517,15 @@ DRWShadingGroup *shgroup_instance_bone_envelope_distance(DRWPass *pass)
|
|||
}
|
||||
|
||||
DRW_shgroup_instance_format(g_formats.instance_bone_envelope_distance, {
|
||||
{"headSphere" , DRW_ATTRIB_FLOAT, 4},
|
||||
{"tailSphere" , DRW_ATTRIB_FLOAT, 4},
|
||||
{"xAxis" , DRW_ATTRIB_FLOAT, 3}
|
||||
{"headSphere", DRW_ATTRIB_FLOAT, 4},
|
||||
{"tailSphere", DRW_ATTRIB_FLOAT, 4},
|
||||
{"xAxis", DRW_ATTRIB_FLOAT, 3}
|
||||
});
|
||||
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(g_shaders.bone_envelope_distance,
|
||||
pass, DRW_cache_bone_envelope_solid_get(),
|
||||
g_formats.instance_bone_envelope_distance);
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(
|
||||
g_shaders.bone_envelope_distance,
|
||||
pass, DRW_cache_bone_envelope_solid_get(),
|
||||
g_formats.instance_bone_envelope_distance);
|
||||
|
||||
return grp;
|
||||
}
|
||||
|
@ -536,16 +539,17 @@ DRWShadingGroup *shgroup_instance_bone_envelope_solid(DRWPass *pass)
|
|||
}
|
||||
|
||||
DRW_shgroup_instance_format(g_formats.instance_bone_envelope, {
|
||||
{"headSphere" , DRW_ATTRIB_FLOAT, 4},
|
||||
{"tailSphere" , DRW_ATTRIB_FLOAT, 4},
|
||||
{"boneColor" , DRW_ATTRIB_FLOAT, 3},
|
||||
{"stateColor" , DRW_ATTRIB_FLOAT, 3},
|
||||
{"xAxis" , DRW_ATTRIB_FLOAT, 3}
|
||||
{"headSphere", DRW_ATTRIB_FLOAT, 4},
|
||||
{"tailSphere", DRW_ATTRIB_FLOAT, 4},
|
||||
{"boneColor", DRW_ATTRIB_FLOAT, 3},
|
||||
{"stateColor", DRW_ATTRIB_FLOAT, 3},
|
||||
{"xAxis", DRW_ATTRIB_FLOAT, 3}
|
||||
});
|
||||
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(g_shaders.bone_envelope,
|
||||
pass, DRW_cache_bone_envelope_solid_get(),
|
||||
g_formats.instance_bone_envelope);
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(
|
||||
g_shaders.bone_envelope,
|
||||
pass, DRW_cache_bone_envelope_solid_get(),
|
||||
g_formats.instance_bone_envelope);
|
||||
|
||||
return grp;
|
||||
}
|
||||
|
@ -559,14 +563,15 @@ DRWShadingGroup *shgroup_instance_mball_handles(DRWPass *pass)
|
|||
}
|
||||
|
||||
DRW_shgroup_instance_format(g_formats.instance_mball_handles, {
|
||||
{"ScaleTranslationMatrix" , DRW_ATTRIB_FLOAT, 12},
|
||||
{"radius" , DRW_ATTRIB_FLOAT, 1},
|
||||
{"color" , DRW_ATTRIB_FLOAT, 3}
|
||||
{"ScaleTranslationMatrix", DRW_ATTRIB_FLOAT, 12},
|
||||
{"radius", DRW_ATTRIB_FLOAT, 1},
|
||||
{"color", DRW_ATTRIB_FLOAT, 3}
|
||||
});
|
||||
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(g_shaders.mball_handles, pass,
|
||||
DRW_cache_screenspace_circle_get(),
|
||||
g_formats.instance_mball_handles);
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(
|
||||
g_shaders.mball_handles, pass,
|
||||
DRW_cache_screenspace_circle_get(),
|
||||
g_formats.instance_mball_handles);
|
||||
DRW_shgroup_uniform_vec3(grp, "screen_vecs[0]", DRW_viewport_screenvecs_get(), 2);
|
||||
|
||||
return grp;
|
||||
|
@ -585,11 +590,12 @@ DRWShadingGroup *shgroup_instance_bone_shape_outline(DRWPass *pass, struct Gwn_B
|
|||
|
||||
DRW_shgroup_instance_format(g_formats.instance_bone_outline, {
|
||||
{"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16},
|
||||
{"outlineColorSize" , DRW_ATTRIB_FLOAT, 4}
|
||||
{"outlineColorSize", DRW_ATTRIB_FLOAT, 4}
|
||||
});
|
||||
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(g_shaders.shape_outline,
|
||||
pass, geom, g_formats.instance_bone_outline);
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(
|
||||
g_shaders.shape_outline,
|
||||
pass, geom, g_formats.instance_bone_outline);
|
||||
DRW_shgroup_uniform_vec2(grp, "viewportSize", DRW_viewport_size_get(), 1);
|
||||
|
||||
return grp;
|
||||
|
@ -605,12 +611,13 @@ DRWShadingGroup *shgroup_instance_bone_shape_solid(DRWPass *pass, struct Gwn_Bat
|
|||
|
||||
DRW_shgroup_instance_format(g_formats.instance_bone, {
|
||||
{"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16},
|
||||
{"boneColor" , DRW_ATTRIB_FLOAT, 3},
|
||||
{"stateColor" , DRW_ATTRIB_FLOAT, 3}
|
||||
{"boneColor", DRW_ATTRIB_FLOAT, 3},
|
||||
{"stateColor", DRW_ATTRIB_FLOAT, 3}
|
||||
});
|
||||
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(g_shaders.shape_solid,
|
||||
pass, geom, g_formats.instance_bone);
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(
|
||||
g_shaders.shape_solid,
|
||||
pass, geom, g_formats.instance_bone);
|
||||
DRW_shgroup_uniform_vec2(grp, "viewportSize", DRW_viewport_size_get(), 1);
|
||||
|
||||
return grp;
|
||||
|
@ -626,12 +633,13 @@ DRWShadingGroup *shgroup_instance_bone_sphere_solid(DRWPass *pass)
|
|||
|
||||
DRW_shgroup_instance_format(g_formats.instance_bone, {
|
||||
{"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16},
|
||||
{"boneColor" , DRW_ATTRIB_FLOAT, 3},
|
||||
{"stateColor" , DRW_ATTRIB_FLOAT, 3}
|
||||
{"boneColor", DRW_ATTRIB_FLOAT, 3},
|
||||
{"stateColor", DRW_ATTRIB_FLOAT, 3}
|
||||
});
|
||||
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(g_shaders.bone_sphere,
|
||||
pass, DRW_cache_bone_point_get(), g_formats.instance_bone);
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(
|
||||
g_shaders.bone_sphere,
|
||||
pass, DRW_cache_bone_point_get(), g_formats.instance_bone);
|
||||
|
||||
return grp;
|
||||
}
|
||||
|
@ -646,12 +654,13 @@ DRWShadingGroup *shgroup_instance_bone_sphere_outline(DRWPass *pass)
|
|||
|
||||
DRW_shgroup_instance_format(g_formats.instance_bone_outline, {
|
||||
{"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16},
|
||||
{"outlineColorSize" , DRW_ATTRIB_FLOAT, 4}
|
||||
{"outlineColorSize", DRW_ATTRIB_FLOAT, 4}
|
||||
});
|
||||
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(g_shaders.bone_sphere_outline,
|
||||
pass, DRW_cache_bone_point_wire_outline_get(),
|
||||
g_formats.instance_bone_outline);
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(
|
||||
g_shaders.bone_sphere_outline,
|
||||
pass, DRW_cache_bone_point_wire_outline_get(),
|
||||
g_formats.instance_bone_outline);
|
||||
DRW_shgroup_uniform_vec2(grp, "viewportSize", DRW_viewport_size_get(), 1);
|
||||
|
||||
return grp;
|
||||
|
@ -667,16 +676,17 @@ DRWShadingGroup *shgroup_instance_bone_stick(DRWPass *pass)
|
|||
|
||||
DRW_shgroup_instance_format(g_formats.instance_bone_stick, {
|
||||
{"boneStart", DRW_ATTRIB_FLOAT, 3},
|
||||
{"boneEnd" , DRW_ATTRIB_FLOAT, 3},
|
||||
{"boneEnd", DRW_ATTRIB_FLOAT, 3},
|
||||
{"wireColor", DRW_ATTRIB_FLOAT, 4}, /* TODO port theses to uchar color */
|
||||
{"boneColor", DRW_ATTRIB_FLOAT, 4},
|
||||
{"headColor", DRW_ATTRIB_FLOAT, 4},
|
||||
{"tailColor", DRW_ATTRIB_FLOAT, 4}
|
||||
});
|
||||
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(g_shaders.bone_stick,
|
||||
pass, DRW_cache_bone_stick_get(),
|
||||
g_formats.instance_bone_stick);
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(
|
||||
g_shaders.bone_stick,
|
||||
pass, DRW_cache_bone_stick_get(),
|
||||
g_formats.instance_bone_stick);
|
||||
DRW_shgroup_uniform_vec2(grp, "viewportSize", DRW_viewport_size_get(), 1);
|
||||
|
||||
return grp;
|
||||
|
|
|
@ -587,7 +587,8 @@ static void drw_viewport_var_init(void)
|
|||
void DRW_viewport_matrix_get(float mat[4][4], DRWViewportMatrixType type)
|
||||
{
|
||||
BLI_assert(type >= 0 && type < DRW_MAT_COUNT);
|
||||
BLI_assert(((DST.override_mat & (1 << type)) != 0) || DST.draw_ctx.rv3d != NULL); /* Can't use this in render mode. */
|
||||
/* Can't use this in render mode. */
|
||||
BLI_assert(((DST.override_mat & (1 << type)) != 0) || DST.draw_ctx.rv3d != NULL);
|
||||
|
||||
copy_m4_m4(mat, DST.view_data.matstate.mat[type]);
|
||||
}
|
||||
|
@ -700,7 +701,8 @@ void *DRW_view_layer_engine_data_get(DrawEngineType *engine_type)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void **DRW_view_layer_engine_data_ensure_ex(ViewLayer *view_layer, DrawEngineType *engine_type, void (*callback)(void *storage))
|
||||
void **DRW_view_layer_engine_data_ensure_ex(
|
||||
ViewLayer *view_layer, DrawEngineType *engine_type, void (*callback)(void *storage))
|
||||
{
|
||||
ViewLayerEngineData *sled;
|
||||
|
||||
|
@ -1558,7 +1560,8 @@ static void draw_select_framebuffer_setup(const rcti *rect)
|
|||
}
|
||||
|
||||
if (g_select_buffer.texture_depth == NULL) {
|
||||
g_select_buffer.texture_depth = GPU_texture_create_2D(BLI_rcti_size_x(rect), BLI_rcti_size_y(rect), GPU_DEPTH_COMPONENT24, NULL, NULL);
|
||||
g_select_buffer.texture_depth = GPU_texture_create_2D(
|
||||
BLI_rcti_size_x(rect), BLI_rcti_size_y(rect), GPU_DEPTH_COMPONENT24, NULL, NULL);
|
||||
|
||||
GPU_framebuffer_texture_attach(g_select_buffer.framebuffer, g_select_buffer.texture_depth, 0, 0);
|
||||
|
||||
|
|
|
@ -797,7 +797,8 @@ DRWShadingGroup *DRW_shgroup_point_batch_create(struct GPUShader *shader, DRWPas
|
|||
return shgroup;
|
||||
}
|
||||
|
||||
DRWShadingGroup *DRW_shgroup_line_batch_create_with_format(struct GPUShader *shader, DRWPass *pass, Gwn_VertFormat *format)
|
||||
DRWShadingGroup *DRW_shgroup_line_batch_create_with_format(
|
||||
struct GPUShader *shader, DRWPass *pass, Gwn_VertFormat *format)
|
||||
{
|
||||
DRWShadingGroup *shgroup = drw_shgroup_create_ex(shader, pass);
|
||||
shgroup->type = DRW_SHG_LINE_BATCH;
|
||||
|
|
|
@ -822,7 +822,8 @@ static void draw_geometry_execute_ex(
|
|||
}
|
||||
|
||||
/* step 2 : bind vertex array & draw */
|
||||
GWN_batch_program_set_no_use(geom, GPU_shader_get_program(shgroup->shader), GPU_shader_get_interface(shgroup->shader));
|
||||
GWN_batch_program_set_no_use(
|
||||
geom, GPU_shader_get_program(shgroup->shader), GPU_shader_get_interface(shgroup->shader));
|
||||
/* XXX hacking gawain. we don't want to call glUseProgram! (huge performance loss) */
|
||||
geom->program_in_use = true;
|
||||
|
||||
|
|
|
@ -116,7 +116,9 @@ static void EDIT_METABALL_cache_init(void *vedata)
|
|||
|
||||
{
|
||||
/* Create a pass */
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND | DRW_STATE_WIRE;
|
||||
DRWState state = (
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL |
|
||||
DRW_STATE_BLEND | DRW_STATE_WIRE);
|
||||
psl->pass = DRW_pass_create("My Pass", state);
|
||||
|
||||
/* Create a shadingGroup using a function in draw_common.c or custom one */
|
||||
|
|
|
@ -149,7 +149,9 @@ static void EDIT_SURFACE_cache_init(void *vedata)
|
|||
|
||||
{
|
||||
/* Create a pass */
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND | DRW_STATE_WIRE;
|
||||
DRWState state = (
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL |
|
||||
DRW_STATE_BLEND | DRW_STATE_WIRE);
|
||||
psl->pass = DRW_pass_create("My Pass", state);
|
||||
|
||||
/* Create a shadingGroup using a function in draw_common.c or custom one */
|
||||
|
|
|
@ -76,7 +76,8 @@ static void overlay_engine_init(void *vedata)
|
|||
|
||||
if (!e_data.face_orientation_sh) {
|
||||
/* Face orientation */
|
||||
e_data.face_orientation_sh = DRW_shader_create(datatoc_overlay_face_orientation_vert_glsl, NULL, datatoc_overlay_face_orientation_frag_glsl, "\n");
|
||||
e_data.face_orientation_sh = DRW_shader_create(
|
||||
datatoc_overlay_face_orientation_vert_glsl, NULL, datatoc_overlay_face_orientation_frag_glsl, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,7 +101,8 @@ static void overlay_cache_init(void *vedata)
|
|||
if (stl->g_data->overlay.flag & V3D_OVERLAY_FACE_ORIENTATION) {
|
||||
int state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_BLEND;
|
||||
psl->face_orientation_pass = DRW_pass_create("Face Orientation", state);
|
||||
stl->g_data->face_orientation_shgrp = DRW_shgroup_create(e_data.face_orientation_sh, psl->face_orientation_pass);
|
||||
stl->g_data->face_orientation_shgrp = DRW_shgroup_create(
|
||||
e_data.face_orientation_sh, psl->face_orientation_pass);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,8 +63,6 @@
|
|||
|
||||
#include "DRW_engine.h"
|
||||
|
||||
#include "DEG_depsgraph_query.h"
|
||||
|
||||
#include "view3d_intern.h" /* own include */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
|
Loading…
Reference in New Issue