Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sergcpp committed Dec 19, 2024
1 parent 345a1c8 commit 6b0e228
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion internal/AtmosphereRef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ void Ray::Ref::ShadeSky(const pass_settings_t &ps, const float limit, Span<const
} else if (sc.env.atmosphere.stars_brightness > 0.0f) {
// Use fake lightsource (to light up the moon)
const fvec4 light_dir = {0.0f, -1.0f, 0.0f, 0.0f},
light_col = {144809.866891f, 129443.618266f, 127098.894121f, 0.0f};
light_col = {144809.859f, 129443.617f, 127098.89f, 0.0f};

color += IntegrateScattering(sc.env.atmosphere, fvec4{0.0f, sc.env.atmosphere.viewpoint_height, 0.0f, 0.0f},
I, MAX_DIST, light_dir, 0.0f, light_col, sc.sky_transmittance_lut,
Expand Down
2 changes: 1 addition & 1 deletion internal/CoreSIMD.h
Original file line number Diff line number Diff line change
Expand Up @@ -8170,7 +8170,7 @@ void Ray::NS::ShadeSky(const pass_settings_t &ps, float limit, Span<const hit_da
} else if (sc.env.atmosphere.stars_brightness > 0.0f) {
// Use fake lightsource (to light up the moon)
const Ref::fvec4 light_dir = {0.0f, -1.0f, 0.0f, 0.0f},
light_col = {144809.866891f, 129443.618266f, 127098.894121f, 0.0f};
light_col = {144809.859f, 129443.617f, 127098.89f, 0.0f};

color += Ref::IntegrateScattering(
sc.env.atmosphere, Ref::fvec4{0.0f, sc.env.atmosphere.viewpoint_height, 0.0f, 0.0f}, _I, MAX_DIST,
Expand Down
2 changes: 1 addition & 1 deletion internal/RendererGPU_kernels.h
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ inline void Ray::NS::Renderer::kernel_ShadeSky(CommandBuffer cmd_buf, const pass
} else if (sc_data.env.atmosphere.stars_brightness > 0.0f) {
// Use fake lightsource (to light up the moon)
const fvec4 light_dir = {0.0f, -1.0f, 0.0f, 0.0f},
light_col = {144809.866891f, 129443.618266f, 127098.894121f, 0.0f};
light_col = {144809.859f, 129443.617f, 127098.89f, 0.0f};

memcpy(uniform_params.light_dir, value_ptr(light_dir), 3 * sizeof(float));
uniform_params.light_dir[3] = 0.0f;
Expand Down
2 changes: 1 addition & 1 deletion internal/SceneCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ Ray::SceneCommon::CalcSkyEnvTexture(const atmosphere_params_t &params, const int
} else if (params.stars_brightness > 0.0f) {
// Use fake lightsource (to light up the moon)
const Ref::fvec4 light_dir = {0.0f, -1.0f, 0.0f, 0.0f},
light_col = {144809.866891f, 129443.618266f, 127098.894121f, 0.0f};
light_col = {144809.859f, 129443.617f, 127098.89f, 0.0f};

color += IntegrateScattering(params, Ref::fvec4{0.0f, params.viewpoint_height, 0.0f, 0.0f}, ray_dir,
MAX_DIST, light_dir, 0.0f, light_col, sky_transmittance_lut_,
Expand Down
2 changes: 1 addition & 1 deletion internal/SceneGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -1715,7 +1715,7 @@ inline std::vector<Ray::color_rgba8_t> Ray::NS::Scene::CalcSkyEnvTexture(const a
} else if (env_.atmosphere.stars_brightness > 0.0f) {
// Use fake lightsource (to light up the moon)
const fvec4 light_dir = {0.0f, -1.0f, 0.0f, 0.0f},
light_col = {144809.866891f, 129443.618266f, 127098.894121f, 0.0f};
light_col = {144809.859f, 129443.617f, 127098.89f, 0.0f};

memcpy(uniform_params.light_dir, value_ptr(light_dir), 3 * sizeof(float));
uniform_params.light_dir[3] = 0.0f;
Expand Down
6 changes: 3 additions & 3 deletions tests/test_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,9 +951,9 @@ void setup_test_scene(ThreadPool &threads, Ray::SceneBase &scene, const int min_
sun_desc.direction[1] = -0.454519480f;
sun_desc.direction[2] = -0.766044438f;

sun_desc.color[0] = 144809.866891f;
sun_desc.color[1] = 129443.618266f;
sun_desc.color[2] = 127098.894121f;
sun_desc.color[0] = 144809.859f;
sun_desc.color[1] = 129443.617f;
sun_desc.color[2] = 127098.890f;

sun_desc.angle = 4.0f;

Expand Down

0 comments on commit 6b0e228

Please sign in to comment.