Blender Git Loki
Git Commits -> Revision 105a1d8
Revision 105a1d8 by Clément Fukhaut (pbr-viewport) May 6, 2016, 13:55 (GMT) |
Huge codebase changes : - Made ssfx "module" to manage screen space effects applied at material stage - Moved probe functions to their own module - Divided Shading glsl file into bits that are gathered when making glsl_material_library making files shorter and more organized - Moved function generating luts and random texture to gpu_luts.c that will contains all textures needed to acheive some effects. - GPU_PBR in GPUBuiltin is just a placeholder to trigger the uniform binding Optimisation / correction : - GLSL : Number of bsdf sample is now passed via an uniform instead of a #define. This means changing quality settings will no longer recompute every shaders in the scene. But this has a small perf cost. - GLSL : Hammersley numbers are precalculated and stored inside a texture. This may have a performance impact and I will change it to a static table. - GLSL : Random per pixel numbers are done using a texture like SSAO. - GLSL : Lots of parameters (only for pbr) are now defined as uniform and passed at binding stage (this minimize the use of GPU_builtin). - GLSL : most variables used in sampling algorythm are defined as global variables. - Bsdf sampling is now using the real algorithm and not the split sum approximation (which was unecessary). Features : - Added toon shader support (only point light support). - Added holdout. |
Commit Details:
Full Hash: 105a1d84c43fe462d99ae5c8939ed3c67c127afd
Parent Commit: 80f0370
Lines Changed: +5178, -4603
17 Added Paths:
/source/blender/gpu/GPU_luts.h (+56, -0) (View)
/source/blender/gpu/GPU_probe.h (+118, -0) (View)
/source/blender/gpu/GPU_ssfx.h (+64, -0) (View)
/source/blender/gpu/intern/gpu_luts.c (+183, -0) (View)
/source/blender/gpu/intern/gpu_probe.c (+685, -0) (View)
/source/blender/gpu/intern/gpu_ssfx.c (+174, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_anisotropic.glsl (+314, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_diffuse.glsl (+273, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_glass.glsl (+223, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_glossy.glsl (+365, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_refraction.glsl (+320, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_toon.glsl (+273, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_translucent.glsl (+55, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_transparent.glsl (+30, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_velvet.glsl (+156, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_new_shading.glsl (+775, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_utils.glsl (+640, -0) (View)
/source/blender/gpu/GPU_probe.h (+118, -0) (View)
/source/blender/gpu/GPU_ssfx.h (+64, -0) (View)
/source/blender/gpu/intern/gpu_luts.c (+183, -0) (View)
/source/blender/gpu/intern/gpu_probe.c (+685, -0) (View)
/source/blender/gpu/intern/gpu_ssfx.c (+174, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_anisotropic.glsl (+314, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_diffuse.glsl (+273, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_glass.glsl (+223, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_glossy.glsl (+365, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_refraction.glsl (+320, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_toon.glsl (+273, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_translucent.glsl (+55, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_transparent.glsl (+30, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_velvet.glsl (+156, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_new_shading.glsl (+775, -0) (View)
/source/blender/gpu/shaders/gpu_shader_material_utils.glsl (+640, -0) (View)
4 Deleted Paths:
/source/blender/gpu/GPU_ssr.h (+0, -64)
/source/blender/gpu/intern/gpu_ssr.c (+0, -170)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_frag.glsl (+0, -863)
/source/blender/gpu/shaders/gpu_shader_material_ssr_frag.glsl (+0, -204)
/source/blender/gpu/intern/gpu_ssr.c (+0, -170)
/source/blender/gpu/shaders/gpu_shader_material_bsdf_frag.glsl (+0, -863)
/source/blender/gpu/shaders/gpu_shader_material_ssr_frag.glsl (+0, -204)
25 Modified Paths:
/source/blender/blenkernel/intern/object.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/world.c (+1, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+1, -0) (Diff)
/source/blender/editors/object/object_add.c (+1, -0) (Diff)
/source/blender/editors/object/object_probe.c (+1, -1) (Diff)
/source/blender/editors/render/render_shading.c (+1, -0) (Diff)
/source/blender/editors/render/render_update.c (+1, -0) (Diff)
/source/blender/editors/space_view3d/space_view3d.c (+6, -1) (Diff)
/source/blender/editors/space_view3d/view3d_draw.c (+11, -1) (Diff)
/source/blender/gpu/CMakeLists.txt (+28, -6) (Diff)
/source/blender/gpu/GPU_material.h (+7, -63) (Diff)
/source/blender/gpu/GPU_shader.h (+1, -2) (Diff)
/source/blender/gpu/intern/gpu_codegen.c (+32, -108) (Diff)
/source/blender/gpu/intern/gpu_codegen.h (+1, -6) (Diff)
/source/blender/gpu/intern/gpu_compositing.c (+1, -73) (Diff)
/source/blender/gpu/intern/gpu_draw.c (+12, -15) (Diff)
/source/blender/gpu/intern/gpu_material.c (+310, -975) (Diff)
/source/blender/gpu/intern/gpu_shader.c (+5, -17) (Diff)
/source/blender/gpu/shaders/gpu_shader_fx_colormanage_frag.glsl (+0, -19) (Diff)
/source/blender/gpu/shaders/gpu_shader_material.glsl (+1, -2008) (Diff)
/source/blender/makesdna/DNA_view3d_types.h (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_toon.c (+45, -5) (Diff)
/source/blender/nodes/shader/nodes/node_shader_holdout.c (+4, -0) (Diff)
/source/gameengine/Ketsji/BL_BlenderShader.cpp (+1, -1) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp (+1, -1) (Diff)
/source/blender/blenkernel/intern/world.c (+1, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+1, -0) (Diff)
/source/blender/editors/object/object_add.c (+1, -0) (Diff)
/source/blender/editors/object/object_probe.c (+1, -1) (Diff)
/source/blender/editors/render/render_shading.c (+1, -0) (Diff)
/source/blender/editors/render/render_update.c (+1, -0) (Diff)
/source/blender/editors/space_view3d/space_view3d.c (+6, -1) (Diff)
/source/blender/editors/space_view3d/view3d_draw.c (+11, -1) (Diff)
/source/blender/gpu/CMakeLists.txt (+28, -6) (Diff)
/source/blender/gpu/GPU_material.h (+7, -63) (Diff)
/source/blender/gpu/GPU_shader.h (+1, -2) (Diff)
/source/blender/gpu/intern/gpu_codegen.c (+32, -108) (Diff)
/source/blender/gpu/intern/gpu_codegen.h (+1, -6) (Diff)
/source/blender/gpu/intern/gpu_compositing.c (+1, -73) (Diff)
/source/blender/gpu/intern/gpu_draw.c (+12, -15) (Diff)
/source/blender/gpu/intern/gpu_material.c (+310, -975) (Diff)
/source/blender/gpu/intern/gpu_shader.c (+5, -17) (Diff)
/source/blender/gpu/shaders/gpu_shader_fx_colormanage_frag.glsl (+0, -19) (Diff)
/source/blender/gpu/shaders/gpu_shader_material.glsl (+1, -2008) (Diff)
/source/blender/makesdna/DNA_view3d_types.h (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_toon.c (+45, -5) (Diff)
/source/blender/nodes/shader/nodes/node_shader_holdout.c (+4, -0) (Diff)
/source/gameengine/Ketsji/BL_BlenderShader.cpp (+1, -1) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp (+1, -1) (Diff)