Cleanup: Cycles: rename variable for clarity
rename `rphase` to `rchannel` as this variable is only used for sampling a color channel
This commit is contained in:
@@ -413,7 +413,7 @@ typedef struct VolumeIntegrateState {
|
||||
|
||||
/* Random numbers for scattering. */
|
||||
float rscatter;
|
||||
float rphase;
|
||||
float rchannel;
|
||||
|
||||
/* Multiple importance sampling. */
|
||||
VolumeSampleMethod direct_sample_method;
|
||||
@@ -436,7 +436,7 @@ ccl_device_forceinline void volume_integrate_step_scattering(
|
||||
const Spectrum albedo = safe_divide_color(coeff.sigma_s, coeff.sigma_t);
|
||||
Spectrum channel_pdf;
|
||||
const int channel = volume_sample_channel(
|
||||
albedo, result.indirect_throughput, vstate.rphase, &channel_pdf);
|
||||
albedo, result.indirect_throughput, vstate.rchannel, &channel_pdf);
|
||||
|
||||
/* Equiangular sampling for direct lighting. */
|
||||
if (vstate.direct_sample_method == VOLUME_SAMPLE_EQUIANGULAR && !result.direct_scatter) {
|
||||
@@ -556,7 +556,7 @@ ccl_device_forceinline void volume_integrate_heterogeneous(
|
||||
vstate.tmax = ray->tmin;
|
||||
vstate.absorption_only = true;
|
||||
vstate.rscatter = path_state_rng_1D(kg, rng_state, PRNG_VOLUME_SCATTER_DISTANCE);
|
||||
vstate.rphase = path_state_rng_1D(kg, rng_state, PRNG_VOLUME_PHASE_CHANNEL);
|
||||
vstate.rchannel = path_state_rng_1D(kg, rng_state, PRNG_VOLUME_COLOR_CHANNEL);
|
||||
|
||||
/* Multiple importance sampling: pick between equiangular and distance sampling strategy. */
|
||||
vstate.direct_sample_method = direct_sample_method;
|
||||
|
||||
@@ -267,9 +267,9 @@ ccl_device_inline bool subsurface_random_walk(KernelGlobals kg,
|
||||
# endif
|
||||
|
||||
/* Sample color channel, use MIS with balance heuristic. */
|
||||
float rphase = path_state_rng_1D(kg, &rng_state, PRNG_SUBSURFACE_PHASE_CHANNEL);
|
||||
float rchannel = path_state_rng_1D(kg, &rng_state, PRNG_SUBSURFACE_COLOR_CHANNEL);
|
||||
Spectrum channel_pdf;
|
||||
int channel = volume_sample_channel(alpha, throughput, rphase, &channel_pdf);
|
||||
int channel = volume_sample_channel(alpha, throughput, rchannel, &channel_pdf);
|
||||
float sample_sigma_t = volume_channel_get(sigma_t, channel);
|
||||
float randt = path_state_rng_1D(kg, &rng_state, PRNG_SUBSURFACE_SCATTER_DISTANCE);
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@ enum PathTraceDimension {
|
||||
|
||||
/* Volume */
|
||||
PRNG_VOLUME_PHASE = 3,
|
||||
PRNG_VOLUME_PHASE_CHANNEL = 4,
|
||||
PRNG_VOLUME_COLOR_CHANNEL = 4,
|
||||
PRNG_VOLUME_SCATTER_DISTANCE = 5,
|
||||
PRNG_VOLUME_OFFSET = 6,
|
||||
PRNG_VOLUME_SHADE_OFFSET = 7,
|
||||
@@ -310,7 +310,7 @@ enum PathTraceDimension {
|
||||
|
||||
/* Subsurface random walk bounces */
|
||||
PRNG_SUBSURFACE_BSDF = 0,
|
||||
PRNG_SUBSURFACE_PHASE_CHANNEL = 1,
|
||||
PRNG_SUBSURFACE_COLOR_CHANNEL = 1,
|
||||
PRNG_SUBSURFACE_SCATTER_DISTANCE = 2,
|
||||
PRNG_SUBSURFACE_GUIDE_STRATEGY = 3,
|
||||
PRNG_SUBSURFACE_GUIDE_DIRECTION = 4,
|
||||
|
||||
Reference in New Issue
Block a user