Skip to content

LocalReflections adds screen-space reflections on top of the environment specular #4142

Backlog

Description

@delustra

Stride version

master

Platforms

Linux

Graphics API

Vulkan

What happens

The combine pass of the Local Reflections post effect adds the resolved reflection to the scene color:

sceneColor.rgb += ssr.rgb * EnvBRDFApprox(specularColor, roughness, NoV) (SSLRCombinePass.sdsl)

The scene color already holds the specular reflection of the environment lights (the skybox light) for the same pixel, and nothing takes it out. Where a ray hits the scene, the surface shows both at once: the reflected object and the sky "through" it.

Expected: a reflection found on screen replaces the reflection of the environment, in proportion to how much of the pixel's rays hit the scene. The reflection of a dark object in a mirror-like floor is dark.

Actual: the reflection of an object is never darker than the sky reflection of the surface, so reflections look washed out. The error scales with the specular color: small on dielectrics, obvious on metals.

Steps to reproduce

  1. A scene with a skybox light (a bright sky) and a glossy metal floor (metalness 1, glossiness about 0.9).
  2. Put a dark matte box on the floor.
  3. Enable Local Reflections in the post effects of the graphics compositor.
  4. Compare the reflection of the box in the floor with the box itself: the reflection is much brighter, it has the sky's color added.

Log and callstack


Screenshots and other details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Graphicsarea-Shadersbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions