diff options
author | Brecht Van Lommel <brecht> | 2020-03-07 16:38:52 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-03-18 13:23:05 +0300 |
commit | 1162ba206dd7792414d3ae716877ba1383de8dab (patch) | |
tree | 3b243a7c33dfbbc6414e96a4df6b37ddc47531cd /intern/cycles/kernel/kernel_types.h | |
parent | 9d20f170c7c07ac38e86130de591ae98e9c0cf80 (diff) |
Cycles: change volume step size controls, auto adjust based on voxel size
By default it will now set the step size to the voxel size for smoke and
volume objects, and 1/10th the bounding box for procedural volume shaders.
New settings are:
* Scene render/preview step rate: to globally adjust detail and performance
* Material step rate: multiplied with auto detected per-object step size
* World step size: distance to steo for world shader
Differential Revision: https://developer.blender.org/D1777
Diffstat (limited to 'intern/cycles/kernel/kernel_types.h')
-rw-r--r-- | intern/cycles/kernel/kernel_types.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index c5be93e2cda..6a0e74efc91 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -887,13 +887,13 @@ enum ShaderDataFlag { SD_HAS_DISPLACEMENT = (1 << 26), /* Has constant emission (value stored in __shaders) */ SD_HAS_CONSTANT_EMISSION = (1 << 27), - /* Needs to access attributes */ - SD_NEED_ATTRIBUTES = (1 << 28), + /* Needs to access attributes for volume rendering */ + SD_NEED_VOLUME_ATTRIBUTES = (1 << 28), SD_SHADER_FLAGS = (SD_USE_MIS | SD_HAS_TRANSPARENT_SHADOW | SD_HAS_VOLUME | SD_HAS_ONLY_VOLUME | SD_HETEROGENEOUS_VOLUME | SD_HAS_BSSRDF_BUMP | SD_VOLUME_EQUIANGULAR | SD_VOLUME_MIS | SD_VOLUME_CUBIC | SD_HAS_BUMP | SD_HAS_DISPLACEMENT | - SD_HAS_CONSTANT_EMISSION | SD_NEED_ATTRIBUTES) + SD_HAS_CONSTANT_EMISSION | SD_NEED_VOLUME_ATTRIBUTES) }; /* Object flags. */ @@ -1275,6 +1275,7 @@ typedef struct KernelBackground { /* only shader index */ int surface_shader; int volume_shader; + float volume_step_size; int transparent; float transparent_roughness_squared_threshold; @@ -1282,7 +1283,6 @@ typedef struct KernelBackground { float ao_factor; float ao_distance; float ao_bounces_factor; - float ao_pad; } KernelBackground; static_assert_align(KernelBackground, 16); @@ -1355,7 +1355,7 @@ typedef struct KernelIntegrator { /* volume render */ int use_volumes; int volume_max_steps; - float volume_step_size; + float volume_step_rate; int volume_samples; int start_sample; |