EEVEE Next: Subsurface Scattering #107407

Merged
Miguel Pozo merged 24 commits from pragma37/blender:pull-eevee-next-sss into main 2023-06-15 15:49:12 +02:00
1 changed files with 6 additions and 1 deletions
Showing only changes of commit ac61b698dd - Show all commits

View File

@ -74,7 +74,7 @@ void main(void)
float pixel_footprint = sample_scale.x * textureSize(hiz_tx, 0).x;
if (pixel_footprint <= 1.0) {
/* Early out. */
out_combined = vec4(texture(radiance_tx, center_uv).rgb * diffuse.color, 0.0);
out_combined = vec4(0);
return;
}
@ -125,6 +125,11 @@ void main(void)
}
/* Normalize the sum (slide 34). */
accum /= accum_weight;
/* This pass uses additive blending.
* Subtract the surface diffuse radiance so it's not added twice. */
accum -= texelFetch(radiance_tx, texel, 0).rgb;
/* Apply surface color on final radiance. */
accum *= diffuse.color;