Blender Git Loki

Git Commits -> Revision 2a48927

Revision 2a48927 by Dalai Felinto (master)
July 14, 2017, 15:46 (GMT)
Implement Uniformbuffer objects for nodetree parameters

For users that means you can tweak shaders in the nodetree and things
are way faster. This is a huge improvement, particularly in
systems that have no shader cache.

From the code perspective it means we are no longer re-compiling the
shader every time a value is tweaked in the UI. We are using uniforms
for those values.

It would be slow to add that many uniforms for all the shaders. So
instead we are using UBO (Uniform Buffer Objects).

This fixes the main issue of T51467. However GWN_shaderinterface_create() still
needs to be improvedi. When opening a .blend all shaders are compiled once, so
optimizing it will bring a measurable impact.

========================================================================
NOTE: This breaks update of Cycles material upon nodetree nodes
tweaking. It will be fixed separately by depsgraph, once tackling T51925
(Animated Eevee values slowdown).

The idea is to make Depsgraph update more granular. The XXX TODO in
rna_nodetree.c will be tackled at that time as well.
========================================================================

Reviewers: sergey, brecht, fclem

Differential Revision: https://developer.blender.org/D2739

Commit Details:

Full Hash: 2a489273d7e2354a9f1afc3212863ff4b463cf86
Parent Commit: 73b1425
Lines Changed: +578, -167

79 Modified Paths:

/source/blender/blenkernel/intern/node.c (+1, -1) (Diff)
/source/blender/draw/intern/draw_manager.c (+5, -0) (Diff)
/source/blender/gpu/GPU_material.h (+13, -1) (Diff)
/source/blender/gpu/GPU_uniformbuffer.h (+13, -0) (Diff)
/source/blender/gpu/intern/gpu_codegen.c (+134, -16) (Diff)
/source/blender/gpu/intern/gpu_codegen.h (+1, -0) (Diff)
/source/blender/gpu/intern/gpu_material.c (+31, -1) (Diff)
/source/blender/gpu/intern/gpu_uniformbuffer.c (+205, -9) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+35, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_add_shader.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_attribute.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_background.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_brightness.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_diffuse.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_hair.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.c (+3, -3) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_refraction.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_toon.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_transparent.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_velvet.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bump.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_camera.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_curves.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_eevee_metallic.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_eevee_specular.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_emission.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_fresnel.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_gamma.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_geom.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_geometry.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_invert.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_lamp.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_layer_weight.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_light_falloff.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_light_path.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_mapping.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_math.c (+3, -3) (Diff)
/source/blender/nodes/shader/nodes/node_shader_mixRgb.c (+2, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_mix_shader.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_normal.c (+3, -3) (Diff)
/source/blender/nodes/shader/nodes/node_shader_object_info.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_output.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_output_eevee_material.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_output_material.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_output_world.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_particle_info.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_rgb.c (+3, -3) (Diff)
/source/blender/nodes/shader/nodes/node_shader_sepcombHSV.c (+4, -4) (Diff)
/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c (+4, -4) (Diff)
/source/blender/nodes/shader/nodes/node_shader_sepcombXYZ.c (+4, -4) (Diff)
/source/blender/nodes/shader/nodes/node_shader_squeeze.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tangent.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_texture.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_brick.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_checker.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_coord.c (+3, -3) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_environment.c (+3, -3) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_image.c (+4, -4) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_magic.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_noise.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_sky.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_wave.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_uvmap.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_valToRgb.c (+3, -3) (Diff)
/source/blender/nodes/shader/nodes/node_shader_value.c (+3, -3) (Diff)
/source/blender/nodes/shader/nodes/node_shader_vectMath.c (+3, -3) (Diff)
/source/blender/nodes/shader/nodes/node_shader_volume_absorption.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_volume_scatter.c (+2, -2) (Diff)
/source/blender/nodes/shader/node_shader_util.h (+1, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021