forked from bartvdbraak/blender
Cycles: make displacement a supported feature.
Adaptive subdivision remains experimental, still needs more work.
This commit is contained in:
parent
f9ea097a87
commit
bb6f1d159a
@ -1315,13 +1315,9 @@ class CYCLES_MATERIAL_PT_settings(CyclesButtonsPanel, Panel):
|
||||
col.prop(cmat, "sample_as_light", text="Multiple Importance")
|
||||
col.prop(cmat, "use_transparent_shadow")
|
||||
|
||||
if context.scene.cycles.feature_set == 'EXPERIMENTAL':
|
||||
col.separator()
|
||||
col.label(text="Geometry:")
|
||||
col.prop(cmat, "displacement_method", text="")
|
||||
else:
|
||||
col.separator()
|
||||
col.prop(mat, "pass_index")
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Volume:")
|
||||
@ -1331,7 +1327,6 @@ class CYCLES_MATERIAL_PT_settings(CyclesButtonsPanel, Panel):
|
||||
col.prop(cmat, "volume_interpolation", text="")
|
||||
col.prop(cmat, "homogeneous_volume", text="Homogeneous")
|
||||
|
||||
if context.scene.cycles.feature_set == 'EXPERIMENTAL':
|
||||
col.separator()
|
||||
col.prop(mat, "pass_index")
|
||||
|
||||
|
@ -1234,7 +1234,7 @@ void BlenderSync::sync_materials(bool update_all)
|
||||
shader->heterogeneous_volume = !get_boolean(cmat, "homogeneous_volume");
|
||||
shader->volume_sampling_method = get_volume_sampling(cmat);
|
||||
shader->volume_interpolation_method = get_volume_interpolation(cmat);
|
||||
shader->displacement_method = (experimental) ? get_displacement_method(cmat) : DISPLACE_BUMP;
|
||||
shader->displacement_method = get_displacement_method(cmat);
|
||||
|
||||
shader->set_graph(graph);
|
||||
|
||||
|
@ -625,7 +625,7 @@ void ShaderManager::get_requested_features(Scene *scene,
|
||||
ShaderNode *output_node = shader->graph->output();
|
||||
if(output_node->input("Displacement")->link != NULL) {
|
||||
requested_features->nodes_features |= NODE_FEATURE_BUMP;
|
||||
if(shader->displacement_method == DISPLACE_BOTH && requested_features->experimental) {
|
||||
if(shader->displacement_method == DISPLACE_BOTH) {
|
||||
requested_features->nodes_features |= NODE_FEATURE_BUMP_STATE;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user