Skip to content

Conversation

@atlv24
Copy link
Contributor

@atlv24 atlv24 commented Jan 18, 2026

Objective

  • solid_color returned envmap lights that looked black

Solution

  • set intensity to 1.0
  • also make sure to use proper color space (linear)

Testing

  • tested in reflection_probe example

@atlv24 atlv24 added A-Rendering Drawing game state to the screen S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jan 18, 2026
@alice-i-cecile alice-i-cecile added the C-Bug An unexpected or incorrect behavior label Jan 18, 2026
@DGriffin91
Copy link
Contributor

DGriffin91 commented Jan 18, 2026

I think it would be good to expose the intensity as a param so setting it feels similar to doing

EnvironmentMapLight {
    diffuse_map: asset_server.load("environment_maps/pisa_diffuse_rgb9e5_zstd.ktx2"),
    specular_map: asset_server.load("environment_maps/pisa_specular_rgb9e5_zstd.ktx2"),
    intensity: 250.0,
    ..default()
},

or

GlobalAmbientLight {
    color: Color::WHITE,
    brightness: 250.0,
    ..default()
}

Or add a method to set it on EnvironmentMapLight so you could do EnvironmentMapLight::hemispherical_gradient().intensity(250.0) or whatever.

@DGriffin91
Copy link
Contributor

Not tied directly to this PR but the initial one got merged before I had a chance to test. Anyway I think this needs to be a bit higher resolution to be generally usable since only bilinear sampling is used:
image

@DGriffin91
Copy link
Contributor

DGriffin91 commented Jan 18, 2026

If hemispherical_gradient_cubemap() was pub it would also let you use the same HDRI for the SkyBox and EnvMap

let cubemap = assets.add(Self::hemispherical_gradient_cubemap(
    Color::linear_rgb(2.0, 2.0, 2.0),
    Color::linear_rgb(1.0, 1.0, 1.0),
    Color::linear_rgb(0.0, 0.0, 0.0),
));
[...]
EnvironmentMapLight {
    diffuse_map: cubemap.clone(),
    specular_map: cubemap.clone(),
    intensity: 1000.0,
    ..default()
},
Skybox {
    image: cubemap.clone(),
    brightness: 1000.0,
    ..default()
}

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

Labels

A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants