Render: default roughness distribution to Multiscatter GGX
for glass, glossy and principled BSDF. It is more energy-preserving than
GGX, and with the albedo scaling instead of random walk (888bdc1419) the
render time stays reasonable.
Task: #99447
Pull Request: https://projects.blender.org/blender/blender/pulls/111267
This commit is contained in:
committed by
Weizhen Huang
parent
639223d92f
commit
8367167626
@@ -608,6 +608,7 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
|
||||
bNodeSocketValueFloat *roughness_data = static_cast<bNodeSocketValueFloat *>(
|
||||
roughness_socket->default_value);
|
||||
roughness_data->value = 0.5f;
|
||||
node->custom1 = SHD_GLOSSY_MULTI_GGX;
|
||||
node->custom2 = SHD_SUBSURFACE_RANDOM_WALK;
|
||||
BKE_ntree_update_tag_node_property(ma->nodetree, node);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ static void node_declare(NodeDeclarationBuilder &b)
|
||||
|
||||
static void node_shader_init_glass(bNodeTree * /*ntree*/, bNode *node)
|
||||
{
|
||||
node->custom1 = SHD_GLOSSY_BECKMANN;
|
||||
node->custom1 = SHD_GLOSSY_MULTI_GGX;
|
||||
}
|
||||
|
||||
static int node_shader_gpu_bsdf_glass(GPUMaterial *mat,
|
||||
|
||||
@@ -36,7 +36,7 @@ static void node_shader_buts_glossy(uiLayout *layout, bContext * /*C*/, PointerR
|
||||
|
||||
static void node_shader_init_glossy(bNodeTree * /*ntree*/, bNode *node)
|
||||
{
|
||||
node->custom1 = SHD_GLOSSY_GGX;
|
||||
node->custom1 = SHD_GLOSSY_MULTI_GGX;
|
||||
}
|
||||
|
||||
static int node_shader_gpu_bsdf_glossy(GPUMaterial *mat,
|
||||
|
||||
@@ -137,7 +137,7 @@ static void node_shader_buts_principled(uiLayout *layout, bContext * /*C*/, Poin
|
||||
|
||||
static void node_shader_init_principled(bNodeTree * /*ntree*/, bNode *node)
|
||||
{
|
||||
node->custom1 = SHD_GLOSSY_GGX;
|
||||
node->custom1 = SHD_GLOSSY_MULTI_GGX;
|
||||
node->custom2 = SHD_SUBSURFACE_RANDOM_WALK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user