Cleanup: line length
This commit is contained in:
@@ -364,7 +364,9 @@ static void CLAY_engine_init(void *vedata)
|
||||
}
|
||||
|
||||
if (!e_data.hair_sh) {
|
||||
e_data.hair_sh = DRW_shader_create(datatoc_particle_vert_glsl, NULL, datatoc_particle_strand_frag_glsl, "#define MAX_MATERIAL 512\n");
|
||||
e_data.hair_sh = DRW_shader_create(
|
||||
datatoc_particle_vert_glsl, NULL, datatoc_particle_strand_frag_glsl,
|
||||
"#define MAX_MATERIAL 512\n");
|
||||
}
|
||||
|
||||
if (!stl->storage) {
|
||||
@@ -398,13 +400,15 @@ static void CLAY_engine_init(void *vedata)
|
||||
{
|
||||
const DRWContextState *draw_ctx = DRW_context_state_get();
|
||||
SceneLayer *scene_layer = draw_ctx->sl;
|
||||
IDProperty *props = BKE_scene_layer_engine_evaluated_get(scene_layer, COLLECTION_MODE_NONE, RE_engine_id_BLENDER_CLAY);
|
||||
IDProperty *props = BKE_scene_layer_engine_evaluated_get(
|
||||
scene_layer, COLLECTION_MODE_NONE, RE_engine_id_BLENDER_CLAY);
|
||||
int ssao_samples = BKE_collection_engine_property_value_get_int(props, "ssao_samples");
|
||||
|
||||
float invproj[4][4];
|
||||
float dfdyfacs[2];
|
||||
const bool is_persp = DRW_viewport_is_persp_get();
|
||||
/* view vectors for the corners of the view frustum. Can be used to recreate the world space position easily */
|
||||
/* view vectors for the corners of the view frustum.
|
||||
* Can be used to recreate the world space position easily */
|
||||
float viewvecs[3][4] = {
|
||||
{-1.0f, -1.0f, -1.0f, 1.0f},
|
||||
{1.0f, -1.0f, -1.0f, 1.0f},
|
||||
|
||||
@@ -2959,36 +2959,43 @@ Batch *DRW_mesh_batch_cache_get_fancy_edges(Mesh *me)
|
||||
static void mesh_batch_cache_create_overlay_batches(Mesh *me)
|
||||
{
|
||||
/* Since MR_DATATYPE_OVERLAY is slow to generate, generate them all at once */
|
||||
int options = MR_DATATYPE_VERT | MR_DATATYPE_EDGE | MR_DATATYPE_LOOP | MR_DATATYPE_POLY | MR_DATATYPE_LOOPTRI | MR_DATATYPE_OVERLAY;
|
||||
const int options =
|
||||
MR_DATATYPE_VERT | MR_DATATYPE_EDGE | MR_DATATYPE_LOOP | MR_DATATYPE_POLY |
|
||||
MR_DATATYPE_LOOPTRI | MR_DATATYPE_OVERLAY;
|
||||
|
||||
MeshBatchCache *cache = mesh_batch_cache_get(me);
|
||||
MeshRenderData *rdata = mesh_render_data_create(me, options);
|
||||
|
||||
if (cache->overlay_triangles == NULL) {
|
||||
cache->overlay_triangles = Batch_create(PRIM_TRIANGLES, mesh_batch_cache_get_edit_tri_pos(rdata, cache), NULL);
|
||||
cache->overlay_triangles = Batch_create(
|
||||
PRIM_TRIANGLES, mesh_batch_cache_get_edit_tri_pos(rdata, cache), NULL);
|
||||
Batch_add_VertexBuffer(cache->overlay_triangles, mesh_batch_cache_get_edit_tri_nor(rdata, cache));
|
||||
Batch_add_VertexBuffer(cache->overlay_triangles, mesh_batch_cache_get_edit_tri_data(rdata, cache));
|
||||
}
|
||||
|
||||
if (cache->overlay_loose_edges == NULL) {
|
||||
cache->overlay_loose_edges = Batch_create(PRIM_LINES, mesh_batch_cache_get_edit_ledge_pos(rdata, cache), NULL);
|
||||
cache->overlay_loose_edges = Batch_create(
|
||||
PRIM_LINES, mesh_batch_cache_get_edit_ledge_pos(rdata, cache), NULL);
|
||||
Batch_add_VertexBuffer(cache->overlay_loose_edges, mesh_batch_cache_get_edit_ledge_nor(rdata, cache));
|
||||
Batch_add_VertexBuffer(cache->overlay_loose_edges, mesh_batch_cache_get_edit_ledge_data(rdata, cache));
|
||||
}
|
||||
|
||||
if (cache->overlay_loose_verts == NULL) {
|
||||
cache->overlay_loose_verts = Batch_create(PRIM_POINTS, mesh_batch_cache_get_edit_lvert_pos(rdata, cache), NULL);
|
||||
cache->overlay_loose_verts = Batch_create(
|
||||
PRIM_POINTS, mesh_batch_cache_get_edit_lvert_pos(rdata, cache), NULL);
|
||||
Batch_add_VertexBuffer(cache->overlay_loose_verts, mesh_batch_cache_get_edit_lvert_nor(rdata, cache));
|
||||
Batch_add_VertexBuffer(cache->overlay_loose_verts, mesh_batch_cache_get_edit_lvert_data(rdata, cache));
|
||||
}
|
||||
|
||||
if (cache->overlay_triangles_nor == NULL) {
|
||||
cache->overlay_triangles_nor = Batch_create(PRIM_POINTS, mesh_batch_cache_get_edit_tri_pos(rdata, cache), NULL);
|
||||
cache->overlay_triangles_nor = Batch_create(
|
||||
PRIM_POINTS, mesh_batch_cache_get_edit_tri_pos(rdata, cache), NULL);
|
||||
Batch_add_VertexBuffer(cache->overlay_triangles_nor, mesh_batch_cache_get_edit_tri_nor(rdata, cache));
|
||||
}
|
||||
|
||||
if (cache->overlay_loose_edges_nor == NULL) {
|
||||
cache->overlay_loose_edges_nor = Batch_create(PRIM_POINTS, mesh_batch_cache_get_edit_ledge_pos(rdata, cache), NULL);
|
||||
cache->overlay_loose_edges_nor = Batch_create(
|
||||
PRIM_POINTS, mesh_batch_cache_get_edit_ledge_pos(rdata, cache), NULL);
|
||||
Batch_add_VertexBuffer(cache->overlay_loose_edges_nor, mesh_batch_cache_get_edit_ledge_nor(rdata, cache));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user