Type Alias ScreenSpaceReflectionsSettings

Source
pub type ScreenSpaceReflectionsSettings = ScreenSpaceReflections;
👎Deprecated since 0.15.0: Renamed to ScreenSpaceReflections

Aliased Type§

struct ScreenSpaceReflectionsSettings {
    pub perceptual_roughness_threshold: f32,
    pub thickness: f32,
    pub linear_steps: u32,
    pub linear_march_exponent: f32,
    pub bisection_steps: u32,
    pub use_secant: bool,
}

Fields§

§perceptual_roughness_threshold: f32

The maximum PBR roughness level that will enable screen space reflections.

§thickness: f32

When marching the depth buffer, we only have 2.5D information and don’t know how thick surfaces are. We shall assume that the depth buffer fragments are cuboids with a constant thickness defined by this parameter.

§linear_steps: u32

The number of steps to be taken at regular intervals to find an initial intersection. Must not be zero.

Higher values result in higher-quality reflections, because the raymarching shader is less likely to miss objects. However, they take more GPU time.

§linear_march_exponent: f32

Exponent to be applied in the linear part of the march.

A value of 1.0 will result in equidistant steps, and higher values will compress the earlier steps, and expand the later ones. This might be desirable in order to get more detail close to objects.

For optimal performance, this should be a small unsigned integer, such as 1 or 2.

§bisection_steps: u32

Number of steps in a bisection (binary search) to perform once the linear search has found an intersection. Helps narrow down the hit, increasing the chance of the secant method finding an accurate hit point.

§use_secant: bool

Approximate the root position using the secant method—by solving for line-line intersection between the ray approach rate and the surface gradient.