Blender Git Loki
Git Commits -> Revision 7f84042
Revision 7f84042 by Brecht Van Lommel (master) August 26, 2019, 17:18 (GMT) |
GPU: add mechanism for splitting up big gpu_shader_material.glsl file Compiling this big file for every Eevee material is bad for performance, and now that we are adding more nodes it gets worse. This patch adds a simple mechanism to split up that file, and use only the parts used by shader nodes. When a function is used by GPU_link, we detect which GLSL file it came from and use it in GLSL code generation automatically. Dependencies between GLSL files are manually specified, and function names must be unique across all GLSL files. Most of the actual splitting up will be done in later commits. Differential Revision: https://developer.blender.org/D5569 |
Commit Details:
Full Hash: 7f840426fd4917f56e7bafcffffd51b93c1fc6f7
Parent Commit: 6b189d2
Lines Changed: +410, -319
4 Added Paths:
/source/blender/gpu/intern/gpu_material_library.h (+49, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_hash.glsl (+206, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_magic.glsl (+61, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_white_noise.glsl (+21, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_hash.glsl (+206, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_magic.glsl (+61, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_white_noise.glsl (+21, -0) (View)