diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-03-11 19:49:00 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-03-11 22:35:38 +0300 |
commit | ec3eeee46b4885b9167b0dc28d273993d77b8ce6 (patch) | |
tree | 9177fb4e62877f7cef35c528f10a0881db6f1316 /intern/cycles/render/nodes.cpp | |
parent | 5a169ae2f327f366137b6cefd2da75287f761a4f (diff) |
Cycles: add internal default volume shader, to be used for new volume object
This is mostly straightforward, but required some refactoring to ensure that
the default volume material does not always turn on the volume feature for GPU
rendering.
Diffstat (limited to 'intern/cycles/render/nodes.cpp')
-rw-r--r-- | intern/cycles/render/nodes.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp index 3967b4ef00e..e90b846f7e5 100644 --- a/intern/cycles/render/nodes.cpp +++ b/intern/cycles/render/nodes.cpp @@ -3358,7 +3358,7 @@ NODE_DEFINE(PrincipledVolumeNode) SOCKET_IN_COLOR(emission_color, "Emission Color", make_float3(1.0f, 1.0f, 1.0f)); SOCKET_IN_FLOAT(blackbody_intensity, "Blackbody Intensity", 0.0f); SOCKET_IN_COLOR(blackbody_tint, "Blackbody Tint", make_float3(1.0f, 1.0f, 1.0f)); - SOCKET_IN_FLOAT(temperature, "Temperature", 1500.0f); + SOCKET_IN_FLOAT(temperature, "Temperature", 1000.0f); SOCKET_IN_FLOAT(volume_mix_weight, "VolumeMixWeight", 0.0f, SocketType::SVM_INTERNAL); SOCKET_OUT_CLOSURE(volume, "Volume"); @@ -3369,6 +3369,8 @@ NODE_DEFINE(PrincipledVolumeNode) PrincipledVolumeNode::PrincipledVolumeNode() : VolumeNode(node_type) { closure = CLOSURE_VOLUME_HENYEY_GREENSTEIN_ID; + density_attribute = ustring("density"); + temperature_attribute = ustring("temperature"); } void PrincipledVolumeNode::attributes(Shader *shader, AttributeRequestSet *attributes) |