Merge branch 'blender-v3.2-release'
This commit is contained in:
@@ -54,7 +54,7 @@ void Instance::init(const int2 &output_res,
|
||||
main_view.init(output_res);
|
||||
}
|
||||
|
||||
void Instance::update_eval_members(void)
|
||||
void Instance::update_eval_members()
|
||||
{
|
||||
scene = DEG_get_evaluated_scene(depsgraph);
|
||||
view_layer = DEG_get_evaluated_view_layer(depsgraph);
|
||||
@@ -133,11 +133,11 @@ void Instance::object_sync(Object *ob)
|
||||
ob_handle.reset_recalc_flag();
|
||||
}
|
||||
|
||||
void Instance::end_sync(void)
|
||||
void Instance::end_sync()
|
||||
{
|
||||
}
|
||||
|
||||
void Instance::render_sync(void)
|
||||
void Instance::render_sync()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ void Instance::render_sync(void)
|
||||
* Conceptually renders one sample per pixel.
|
||||
* Everything based on random sampling should be done here (i.e: DRWViews jitter)
|
||||
**/
|
||||
void Instance::render_sample(void)
|
||||
void Instance::render_sample()
|
||||
{
|
||||
main_view.render();
|
||||
}
|
||||
|
@@ -74,21 +74,21 @@ class Instance {
|
||||
const View3D *v3d = nullptr,
|
||||
const RegionView3D *rv3d = nullptr);
|
||||
|
||||
void begin_sync(void);
|
||||
void begin_sync();
|
||||
void object_sync(Object *ob);
|
||||
void end_sync(void);
|
||||
void end_sync();
|
||||
|
||||
void render_sync(void);
|
||||
void render_sync();
|
||||
void render_frame(RenderLayer *render_layer, const char *view_name);
|
||||
|
||||
void draw_viewport(DefaultFramebufferList *dfbl);
|
||||
|
||||
private:
|
||||
void render_sample(void);
|
||||
void render_sample();
|
||||
|
||||
void mesh_sync(Object *ob, ObjectHandle &ob_handle);
|
||||
|
||||
void update_eval_members(void);
|
||||
void update_eval_members();
|
||||
};
|
||||
|
||||
} // namespace blender::eevee
|
||||
|
@@ -154,7 +154,7 @@ MaterialModule::~MaterialModule()
|
||||
BKE_id_free(nullptr, error_mat_);
|
||||
}
|
||||
|
||||
void MaterialModule::begin_sync(void)
|
||||
void MaterialModule::begin_sync()
|
||||
{
|
||||
queued_shaders_count_ = 0;
|
||||
|
||||
|
@@ -115,7 +115,7 @@ struct MaterialKey {
|
||||
options = shader_uuid_from_material_type(surface_pipeline, geometry);
|
||||
}
|
||||
|
||||
uint64_t hash(void) const
|
||||
uint64_t hash() const
|
||||
{
|
||||
BLI_assert(options < sizeof(*mat));
|
||||
return (uint64_t)mat + options;
|
||||
@@ -150,7 +150,7 @@ struct ShaderKey {
|
||||
options = (options << 16u) | shader_closure_bits_from_flag(gpumat);
|
||||
}
|
||||
|
||||
uint64_t hash(void) const
|
||||
uint64_t hash() const
|
||||
{
|
||||
return (uint64_t)shader + options;
|
||||
}
|
||||
@@ -238,7 +238,7 @@ class MaterialModule {
|
||||
MaterialModule(Instance &inst);
|
||||
~MaterialModule();
|
||||
|
||||
void begin_sync(void);
|
||||
void begin_sync();
|
||||
|
||||
MaterialArray &material_array_get(Object *ob);
|
||||
Material &material_get(Object *ob, int mat_nr, eMaterialGeometry geometry_type);
|
||||
|
@@ -36,7 +36,7 @@ void WorldPipeline::sync(GPUMaterial *gpumat)
|
||||
DRW_shgroup_call_obmat(grp, DRW_cache_fullscreen_quad_get(), camera_mat.ptr());
|
||||
}
|
||||
|
||||
void WorldPipeline::render(void)
|
||||
void WorldPipeline::render()
|
||||
{
|
||||
DRW_draw_pass(world_ps_);
|
||||
}
|
||||
@@ -49,7 +49,7 @@ void WorldPipeline::render(void)
|
||||
* NPR materials (using Closure to RGBA) or material using ALPHA_BLEND.
|
||||
* \{ */
|
||||
|
||||
void ForwardPipeline::sync(void)
|
||||
void ForwardPipeline::sync()
|
||||
{
|
||||
{
|
||||
DRWState state = DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS;
|
||||
|
@@ -37,7 +37,7 @@ class WorldPipeline {
|
||||
WorldPipeline(Instance &inst) : inst_(inst){};
|
||||
|
||||
void sync(GPUMaterial *gpumat);
|
||||
void render(void);
|
||||
void render();
|
||||
};
|
||||
|
||||
/** \} */
|
||||
@@ -63,7 +63,7 @@ class ForwardPipeline {
|
||||
public:
|
||||
ForwardPipeline(Instance &inst) : inst_(inst){};
|
||||
|
||||
void sync(void);
|
||||
void sync();
|
||||
|
||||
DRWShadingGroup *material_add(::Material *blender_mat, GPUMaterial *gpumat)
|
||||
{
|
||||
|
@@ -77,7 +77,7 @@ struct ObjectKey {
|
||||
ObjectKey(Object *ob)
|
||||
: ObjectKey(ob, DRW_object_get_dupli(ob), DRW_object_get_dupli_parent(ob)){};
|
||||
|
||||
uint64_t hash(void) const
|
||||
uint64_t hash() const
|
||||
{
|
||||
return hash_value;
|
||||
}
|
||||
@@ -121,7 +121,7 @@ struct ObjectKey {
|
||||
struct ObjectHandle : public DrawData {
|
||||
ObjectKey object_key;
|
||||
|
||||
void reset_recalc_flag(void)
|
||||
void reset_recalc_flag()
|
||||
{
|
||||
if (recalc != 0) {
|
||||
recalc = 0;
|
||||
@@ -130,7 +130,7 @@ struct ObjectHandle : public DrawData {
|
||||
};
|
||||
|
||||
struct WorldHandle : public DrawData {
|
||||
void reset_recalc_flag(void)
|
||||
void reset_recalc_flag()
|
||||
{
|
||||
if (recalc != 0) {
|
||||
recalc = 0;
|
||||
|
@@ -74,6 +74,7 @@ void ShadingView::sync(int2 render_extent_)
|
||||
}
|
||||
#else
|
||||
/* TEMP */
|
||||
UNUSED_VARS(face_matrix_);
|
||||
const DRWView *default_view = DRW_view_default_get();
|
||||
DRW_view_winmat_get(default_view, winmat.ptr(), false);
|
||||
DRW_view_viewmat_get(default_view, viewmat.ptr(), false);
|
||||
@@ -96,7 +97,7 @@ void ShadingView::sync(int2 render_extent_)
|
||||
postfx_tx_.sync();
|
||||
}
|
||||
|
||||
void ShadingView::render(void)
|
||||
void ShadingView::render()
|
||||
{
|
||||
if (!is_enabled_) {
|
||||
return;
|
||||
@@ -180,7 +181,7 @@ GPUTexture *ShadingView::render_post(GPUTexture *input_tx)
|
||||
return input_tx;
|
||||
}
|
||||
|
||||
void ShadingView::update_view(void)
|
||||
void ShadingView::update_view()
|
||||
{
|
||||
float4x4 viewmat, winmat;
|
||||
DRW_view_viewmat_get(main_view_, viewmat.ptr(), false);
|
||||
|
@@ -73,16 +73,16 @@ class ShadingView {
|
||||
|
||||
~ShadingView(){};
|
||||
|
||||
void init(void);
|
||||
void init();
|
||||
|
||||
void sync(int2 render_extent_);
|
||||
|
||||
void render(void);
|
||||
void render();
|
||||
|
||||
GPUTexture *render_post(GPUTexture *input_tx);
|
||||
|
||||
private:
|
||||
void update_view(void);
|
||||
void update_view();
|
||||
};
|
||||
|
||||
/** \} */
|
||||
@@ -135,14 +135,14 @@ class MainView {
|
||||
}
|
||||
}
|
||||
|
||||
void sync(void)
|
||||
void sync()
|
||||
{
|
||||
for (auto i : IndexRange(6)) {
|
||||
shading_views_[i].sync(render_extent_);
|
||||
}
|
||||
}
|
||||
|
||||
void render(void)
|
||||
void render()
|
||||
{
|
||||
for (auto i : IndexRange(6)) {
|
||||
shading_views_[i].render();
|
||||
|
@@ -56,7 +56,7 @@ class World {
|
||||
public:
|
||||
World(Instance &inst) : inst_(inst){};
|
||||
|
||||
void sync(void);
|
||||
void sync();
|
||||
};
|
||||
|
||||
/** \} */
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#pragma BLENDER_REQUIRE(eevee_nodetree_lib.glsl)
|
||||
#pragma BLENDER_REQUIRE(eevee_surf_lib.glsl)
|
||||
|
||||
void main(void)
|
||||
void main()
|
||||
{
|
||||
init_interface();
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#pragma BLENDER_REQUIRE(eevee_attributes_lib.glsl)
|
||||
#pragma BLENDER_REQUIRE(eevee_surf_lib.glsl)
|
||||
|
||||
void main(void)
|
||||
void main()
|
||||
{
|
||||
init_interface();
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#pragma BLENDER_REQUIRE(eevee_nodetree_lib.glsl)
|
||||
#pragma BLENDER_REQUIRE(eevee_surf_lib.glsl)
|
||||
|
||||
void main(void)
|
||||
void main()
|
||||
{
|
||||
init_interface();
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#pragma BLENDER_REQUIRE(eevee_nodetree_lib.glsl)
|
||||
#pragma BLENDER_REQUIRE(eevee_surf_lib.glsl)
|
||||
|
||||
void main(void)
|
||||
void main()
|
||||
{
|
||||
/* Fullscreen triangle. */
|
||||
int v = gl_VertexID % 3;
|
||||
|
@@ -11,7 +11,7 @@
|
||||
#pragma BLENDER_REQUIRE(eevee_surf_lib.glsl)
|
||||
#pragma BLENDER_REQUIRE(eevee_nodetree_lib.glsl)
|
||||
|
||||
void main(void)
|
||||
void main()
|
||||
{
|
||||
init_globals();
|
||||
|
||||
|
@@ -53,7 +53,7 @@ float hashed_alpha_threshold(float hash_scale, float hash_offset, vec3 P)
|
||||
return threshold;
|
||||
}
|
||||
|
||||
void main(void)
|
||||
void main()
|
||||
{
|
||||
#ifdef MAT_TRANSPARENT
|
||||
init_globals();
|
||||
|
@@ -43,7 +43,7 @@ vec4 closure_to_rgba(Closure cl)
|
||||
return out_color;
|
||||
}
|
||||
|
||||
void main(void)
|
||||
void main()
|
||||
{
|
||||
init_globals();
|
||||
|
||||
|
@@ -27,7 +27,7 @@ vec3 barycentric_distances_get()
|
||||
}
|
||||
#endif
|
||||
|
||||
void init_globals_mesh(void)
|
||||
void init_globals_mesh()
|
||||
{
|
||||
#if defined(USE_BARYCENTRICS) && defined(GPU_FRAGMENT_SHADER) && defined(MAT_GEOM_MESH)
|
||||
g_data.barycentric_coords = gpu_BaryCoord.xy;
|
||||
@@ -35,7 +35,7 @@ void init_globals_mesh(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
void init_globals_curves(void)
|
||||
void init_globals_curves()
|
||||
{
|
||||
/* Shade as a cylinder. */
|
||||
float cos_theta = interp.curves_time_width / interp.curves_thickness;
|
||||
@@ -51,13 +51,13 @@ void init_globals_curves(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
void init_globals_gpencil(void)
|
||||
void init_globals_gpencil()
|
||||
{
|
||||
/* Undo backface flip as the gpencil normal is already pointing towards the camera. */
|
||||
g_data.N = interp.N;
|
||||
}
|
||||
|
||||
void init_globals(void)
|
||||
void init_globals()
|
||||
{
|
||||
/* Default values. */
|
||||
g_data.P = interp.P;
|
||||
|
@@ -11,7 +11,7 @@
|
||||
#pragma BLENDER_REQUIRE(eevee_surf_lib.glsl)
|
||||
#pragma BLENDER_REQUIRE(eevee_nodetree_lib.glsl)
|
||||
|
||||
void main(void)
|
||||
void main()
|
||||
{
|
||||
init_globals();
|
||||
/* View position is passed to keep accuracy. */
|
||||
|
@@ -43,8 +43,13 @@ static GPUShader *hair_refine_shader_transform_feedback_create(
|
||||
char *shader_src = BLI_string_joinN(datatoc_common_hair_lib_glsl,
|
||||
datatoc_common_hair_refine_vert_glsl);
|
||||
const char *var_names[1] = {"finalColor"};
|
||||
sh = DRW_shader_create_with_transform_feedback(
|
||||
shader_src, NULL, "#define HAIR_PHASE_SUBDIV\n", GPU_SHADER_TFB_POINTS, var_names, 1);
|
||||
sh = DRW_shader_create_with_transform_feedback(shader_src,
|
||||
NULL,
|
||||
"#define HAIR_PHASE_SUBDIV\n"
|
||||
"#define USE_TF\n",
|
||||
GPU_SHADER_TFB_POINTS,
|
||||
var_names,
|
||||
1);
|
||||
MEM_freeN(shader_src);
|
||||
|
||||
return sh;
|
||||
|
@@ -1,5 +1,9 @@
|
||||
#pragma BLENDER_REQUIRE(common_hair_lib.glsl)
|
||||
|
||||
#ifdef USE_TF
|
||||
out vec4 finalColor;
|
||||
#endif
|
||||
|
||||
void main(void)
|
||||
{
|
||||
float interp_time;
|
||||
|
Reference in New Issue
Block a user