Blender Git Commit Log

Git Commits -> Revision 518e768

Revision 518e768 by Dalai Felinto (master)
September 5, 2017, 14:40 (GMT)
Fix T52441: Principle BSDF clearcoat

Since the change to prevent shader recompilation at every update, we got
a regression when clearcoat was used.

Basically at the shader build time we would determine if the shader
needed clear coat, and if it didin't, it would build a different GLSL
program.

However if later the user updated the clearcoat value so that it would
then require the full clearcoat shader, the user wouldn't get it until
manually forcing the shader to recompile, or reopening the file.

We now handle the optimization in the GLSL code. That adds a minimum
overhead due to branching. But the overall performance seems unchanged
(tested on linux in AMD and NVidia).

Reviewers: pascal, brecht, fclem

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

Commit Details:

Full Hash: 518e7685790f28789bbe795f370ee3b1a5f776c6
Parent Commit: bffa57e
Lines Changed: +9, -7

2 Modified Paths:

/source/blender/gpu/shaders/gpu_shader_material.glsl (+8, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.c (+1, -7) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021