ViewportFrame diffuse IBL taken from Lighting.Sky rather than ViewportFrame.Sky

Inside of a ViewportFrame, I’ve set up a scene with PBR materials and a Sky instance. The specular reflections appear correct, but the diffuse lighting doesn’t match.

Instead, it pulls diffuse colours from the main skybox in Lighting.

Expected behavior

I expect the viewport frame to use the diffuse lighting provided by the skybox that’s parented to it.

I can emulate this by setting the skybox in Lighting to match the skybox in the viewport frame:

9 Likes

Thanks for the report! I filed a ticket in our internal database.

1 Like

Ill be taking a look at this. If you can send over the .rbxl repro, I’ll be able to get to the bottom of this faster.

1 Like

Sure thing - I’ve created a minimal repro.

IBL-Diffuse-Bug.rbxl (49.8 KB)

Here’s the setup:

  • In Lighting, there’s a skybox called Blue.
    image

  • In StarterGui, there’s a ViewportFrame with a skybox called Orange. There’s also a sphere part to preview what the lighting looks like.
    image

This is what it looks like - notice the sphere is receiving blue ambient light, not the orange light from inside the ViewportFrame.

If you swap Blue and Orange, you’ll see it change to the opposite incorrect configuration:

Hope this helps :slight_smile:

1 Like

I got a fix charted for patch 650. Please don’t mark this issue closed until we flipped the feature there though.

3 Likes