mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix: Cycles: Remove volume density cutoff in OSL
The cutoff was removed for SVM in !131696, but the change was not applied to OSL Pull Request: https://projects.blender.org/blender/blender/pulls/157654
This commit is contained in:
parent
f7eae38144
commit
8bc0d293b1
1 changed files with 5 additions and 5 deletions
|
|
@ -22,13 +22,13 @@ shader node_principled_volume(color Color = color(0.5, 0.5, 0.5),
|
|||
float primitive_density = 1.0;
|
||||
float density = max(Density, 0.0);
|
||||
|
||||
if (density > 1e-5) {
|
||||
if (density > 0.0) {
|
||||
if (getattribute(DensityAttribute, primitive_density)) {
|
||||
density = max(density * primitive_density, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
if (density > 1e-5) {
|
||||
if (density > 0.0) {
|
||||
/* Compute scattering color. */
|
||||
color scatter_color = Color;
|
||||
color primitive_color;
|
||||
|
|
@ -48,11 +48,11 @@ shader node_principled_volume(color Color = color(0.5, 0.5, 0.5),
|
|||
float emission_strength = max(EmissionStrength, 0.0);
|
||||
float blackbody_intensity = BlackbodyIntensity;
|
||||
|
||||
if (emission_strength > 1e-5) {
|
||||
if (emission_strength > 0.0) {
|
||||
Volume += emission_strength * EmissionColor * emission();
|
||||
}
|
||||
|
||||
if (blackbody_intensity > 1e-3) {
|
||||
if (blackbody_intensity > 0.0) {
|
||||
float T = Temperature;
|
||||
|
||||
/* Add temperature from attribute if available. */
|
||||
|
|
@ -68,7 +68,7 @@ shader node_principled_volume(color Color = color(0.5, 0.5, 0.5),
|
|||
float sigma = 5.670373e-8 * 1e-6 / M_PI;
|
||||
float intensity = sigma * mix(1.0, T4, blackbody_intensity);
|
||||
|
||||
if (intensity > 1e-5) {
|
||||
if (intensity > 0.0) {
|
||||
color bb = blackbody(T);
|
||||
float l = luminance(bb);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue