Additional improvements and PR feedback on comments
This commit is contained in:
parent
94e155765d
commit
02960236b5
@ -34,13 +34,13 @@ pub struct Camera3d {
|
||||
/// How many individual steps should be performed in the [`Transmissive3d`](crate::core_3d::Transmissive3d) pass.
|
||||
///
|
||||
/// Roughly corresponds to how many “layers of transparency” are rendered for screen space
|
||||
/// refractions for specular transmissive objects. Each step requires making one additional
|
||||
/// specular transmissive objects. Each step requires making one additional
|
||||
/// texture copy, so it's recommended to keep this number to a resonably low value. Defaults to `1`.
|
||||
///
|
||||
/// Setting this to `0` disables the screen-space refraction effect entirely, and falls
|
||||
/// back to refracting only the environment map light's texture.
|
||||
pub screen_space_specular_transmission_steps: usize,
|
||||
/// The quality of the screen space transmission blur effect, applied to the whatever's “behind” transmissive
|
||||
/// The quality of the screen space specular transmission blur effect, applied to the whatever's “behind” transmissive
|
||||
/// objects when their `roughness` is greater than `0.0`.
|
||||
///
|
||||
/// Higher qualities are more GPU-intensive.
|
||||
|
||||
@ -359,7 +359,7 @@ fn fetch_transmissive_background(offset_position: vec2<f32>, frag_coord: vec3<f3
|
||||
#ifdef SCREEN_SPACE_SPECULAR_TRANSMISSION_BLUR_TAPS
|
||||
let num_taps = #{SCREEN_SPACE_SPECULAR_TRANSMISSION_BLUR_TAPS}; // Controlled by the `Camera3d::screen_space_specular_transmission_quality` property
|
||||
#else
|
||||
let num_taps = 8; // Fallback to 8 taps
|
||||
let num_taps = 8; // Fallback to 8 taps, if not specified
|
||||
#endif
|
||||
let num_spirals = i32(ceil(f32(num_taps) / 8.0));
|
||||
let random_angle = interleaved_gradient_noise(frag_coord.xy);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user