Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package CalcMySky for openSUSE:Factory 
checked in at 2025-10-17 17:27:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/CalcMySky (Old)
 and      /work/SRC/openSUSE:Factory/.CalcMySky.new.18484 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "CalcMySky"

Fri Oct 17 17:27:02 2025 rev:7 rq:1311920 version:0.3.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/CalcMySky/CalcMySky.changes      2024-10-14 
13:07:41.217912343 +0200
+++ /work/SRC/openSUSE:Factory/.CalcMySky.new.18484/CalcMySky.changes   
2025-10-17 17:29:26.819253606 +0200
@@ -1,0 +2,6 @@
+Fri Oct 17 07:44:59 UTC 2025 - Paolo Stivanin <[email protected]>
+
+- Update to 0.3.5:
+  * Various fixes
+
+-------------------------------------------------------------------

Old:
----
  CalcMySky-0.3.3.tar.gz

New:
----
  CalcMySky-0.3.5.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ CalcMySky.spec ++++++
--- /var/tmp/diff_new_pack.BPZCJt/_old  2025-10-17 17:29:27.523283260 +0200
+++ /var/tmp/diff_new_pack.BPZCJt/_new  2025-10-17 17:29:27.531283597 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package CalcMySky
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -28,7 +28,7 @@
 %endif
 
 Name:           CalcMySky
-Version:        0.3.3
+Version:        0.3.5
 Release:        0
 Summary:        Software package that simulates scattering of light by the 
atmosphere
 License:        GPL-3.0-or-later

++++++ CalcMySky-0.3.3.tar.gz -> CalcMySky-0.3.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CalcMySky-0.3.3/CMakeLists.txt 
new/CalcMySky-0.3.5/CMakeLists.txt
--- old/CalcMySky-0.3.3/CMakeLists.txt  2024-09-08 18:59:00.000000000 +0200
+++ new/CalcMySky-0.3.5/CMakeLists.txt  2025-06-22 05:09:30.000000000 +0200
@@ -3,12 +3,13 @@
     cmake_policy(SET CMP0110 OLD)
 endif()
 
-set(staticProjectVersion 0.3.3)
+set(staticProjectVersion 0.3.5)
 project(CalcMySky VERSION ${staticProjectVersion} LANGUAGES CXX)
 set(CMAKE_FIND_USE_PACKAGE_REGISTRY false)
 
 set(CMAKE_CXX_STANDARD 17)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_POSITION_INDEPENDENT_CODE ON) # Required on some architectures and 
compilers for Qt
 if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU|Clang")
     set(CMAKE_CXX_FLAGS "-Werror=return-type -Wall -Wextra -fvisibility=hidden 
${CMAKE_CXX_FLAGS}")
 endif()
@@ -76,7 +77,7 @@
        add_library(Eigen3::Eigen IMPORTED INTERFACE)
        target_include_directories(Eigen3::Eigen INTERFACE ${Eigen3_SOURCE_DIR})
 endif()
-include_directories(${CMAKE_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
 
 if(WIN32 AND (NOT MINGW))
     set(shadersDestPath "${CMAKE_PROJECT_NAME}")
@@ -106,7 +107,7 @@
     set(installIncDir "${CMAKE_INSTALL_INCLUDEDIR}")
 endif()
 
-install(DIRECTORY "${CMAKE_SOURCE_DIR}/shaders" DESTINATION 
"${shadersDestPath}")
+install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/shaders" DESTINATION 
"${shadersDestPath}")
 
 # The first command is a dummy, it doesn't actually create its output: it's
 # only needed to force re-running of gen_version.cmake for the case when we've 
changed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CalcMySky-0.3.3/CalcMySky/main.cpp 
new/CalcMySky-0.3.5/CalcMySky/main.cpp
--- old/CalcMySky-0.3.3/CalcMySky/main.cpp      2024-09-08 18:59:00.000000000 
+0200
+++ new/CalcMySky-0.3.5/CalcMySky/main.cpp      2025-06-22 05:09:30.000000000 
+0200
@@ -34,6 +34,8 @@
 using glm::vec4;
 std::vector<glm::vec4> eclipsedDoubleScatteringAccumulatorTexture;
 
+static const QString currentPhaseFunctionStub = "vec4 
currentPhaseFunction(float dotViewSun) { return vec4(3.4028235e38); }\n";
+
 void saveIrradiance(const unsigned scatteringOrder, const unsigned texIndex)
 {
     if(scatteringOrder==atmo.scatteringOrdersToCompute)
@@ -570,8 +572,7 @@
     std::unique_ptr<QOpenGLShaderProgram> program;
     {
         // Make a stub for current phase function. It's not used for ground 
radiance, but we need it to avoid linking errors.
-        
virtualSourceFiles[PHASE_FUNCTIONS_SHADER_FILENAME]=makePhaseFunctionsSrc()+
-            "vec4 currentPhaseFunction(float dotViewSun) { return 
vec4(3.4028235e38); }\n";
+        
virtualSourceFiles[PHASE_FUNCTIONS_SHADER_FILENAME]=makePhaseFunctionsSrc()+currentPhaseFunctionStub;
 
         // Doing replacements instead of using uniforms is meant to
         //  1) Improve performance by statically avoiding branching
@@ -1255,7 +1256,7 @@
             initConstHeader(atmo.allWavelengths[texIndex]);
             virtualSourceFiles[COMPUTE_TRANSMITTANCE_SHADER_FILENAME]=
                 
makeTransmittanceComputeFunctionsSrc(atmo.allWavelengths[texIndex]);
-            
virtualSourceFiles[PHASE_FUNCTIONS_SHADER_FILENAME]=makePhaseFunctionsSrc();
+            
virtualSourceFiles[PHASE_FUNCTIONS_SHADER_FILENAME]=makePhaseFunctionsSrc()+currentPhaseFunctionStub;
             
virtualSourceFiles[TOTAL_SCATTERING_COEFFICIENT_SHADER_FILENAME]=makeTotalScatteringCoefSrc();
             virtualHeaderFiles[RADIANCE_TO_LUMINANCE_HEADER_FILENAME]="const 
mat4 radianceToLuminance=" +
                                                   
toString(radianceToLuminance(texIndex, atmo.allWavelengths)) + ";\n";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CalcMySky-0.3.3/ShowMySky/AtmosphereRenderer.cpp 
new/CalcMySky-0.3.5/ShowMySky/AtmosphereRenderer.cpp
--- old/CalcMySky-0.3.3/ShowMySky/AtmosphereRenderer.cpp        2024-09-08 
18:59:00.000000000 +0200
+++ new/CalcMySky-0.3.5/ShowMySky/AtmosphereRenderer.cpp        2025-06-22 
05:09:30.000000000 +0200
@@ -1438,7 +1438,9 @@
 void AtmosphereRenderer::resetSolarSpectrum()
 {
     // Simple clear() won't work because we want to reset the uniform in the 
programs where it's been already altered
-    std::fill(solarIrradianceFixup_.begin(), solarIrradianceFixup_.end(), 
QVector4D(1,1,1,1));
+    const float*const begin = &params_.solarIrradianceAtTOA[0][0];
+    const float*const end   = &params_.solarIrradianceAtTOA.back()[0]+4;
+    setSolarSpectrum(std::vector<float>(begin, end));
 }
 
 auto AtmosphereRenderer::getViewDirection(QPoint const& pixelPos) -> Direction
@@ -1505,8 +1507,7 @@
             prog.setUniformValue("transmittanceTexture", 0);
             prog.setUniformValue("lightPollutionGroundLuminance", 
float(tools_->lightPollutionGroundLuminance()));
             prog.setUniformValue("pseudoMirrorSkyBelowHorizon", 
tools_->pseudoMirrorEnabled());
-            if(!solarIrradianceFixup_.empty())
-                prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
+            prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
             drawSurface(prog);
         }
         else
@@ -1522,8 +1523,7 @@
             prog.setUniformValue("irradianceTexture",1);
             prog.setUniformValue("lightPollutionGroundLuminance", 
float(tools_->lightPollutionGroundLuminance()));
             prog.setUniformValue("pseudoMirrorSkyBelowHorizon", 
tools_->pseudoMirrorEnabled());
-            if(!solarIrradianceFixup_.empty())
-                prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
+            prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
             drawSurface(prog);
         }
     }
@@ -1552,8 +1552,7 @@
             prog.setUniformValue("sunZenithAngle", 
float(tools_->sunZenithAngle()));
             transmittanceTextures_[wlSetIndex]->bind(0);
             prog.setUniformValue("transmittanceTexture", 0);
-            if(!solarIrradianceFixup_.empty())
-                prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
+            prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
 
             auto& tex = needBlending ? *textures.front() : 
*textures[wlSetIndex];
             gl.glBindFramebuffer(GL_FRAMEBUFFER, 
eclipseSingleScatteringPrecomputationFBO_);
@@ -1602,8 +1601,7 @@
                     transmittanceTextures_[wlSetIndex]->bind(0);
                     prog.setUniformValue("transmittanceTexture", 0);
                     prog.setUniformValue("pseudoMirrorSkyBelowHorizon", 
tools_->pseudoMirrorEnabled());
-                    if(!solarIrradianceFixup_.empty())
-                        prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
+                    prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
 
                     drawSurface(prog);
                 }
@@ -1623,8 +1621,7 @@
                     transmittanceTextures_[wlSetIndex]->bind(0);
                     prog.setUniformValue("transmittanceTexture", 0);
                     prog.setUniformValue("pseudoMirrorSkyBelowHorizon", 
tools_->pseudoMirrorEnabled());
-                    if(!solarIrradianceFixup_.empty())
-                        prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
+                    prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
 
                     drawSurface(prog);
                 }
@@ -1652,8 +1649,7 @@
                         prog.setUniformValue("eclipsedScatteringTexture", 0);
                     }
                     prog.setUniformValue("pseudoMirrorSkyBelowHorizon", 
tools_->pseudoMirrorEnabled());
-                    if(!solarIrradianceFixup_.empty())
-                        prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
+                    prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
 
                     drawSurface(prog);
                 }
@@ -1702,8 +1698,7 @@
                     prog.setUniformValue("useInterpolationGuides", 
guides01Loaded && guides02Loaded);
 
                     prog.setUniformValue("pseudoMirrorSkyBelowHorizon", 
tools_->pseudoMirrorEnabled());
-                    if(!solarIrradianceFixup_.empty())
-                        prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
+                    prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
 
                     drawSurface(prog);
                 }
@@ -1787,8 +1782,7 @@
         int unusedTextureUnitNum=0;
         transmittanceTextures_[wlSetIndex]->bind(unusedTextureUnitNum);
         prog.setUniformValue("transmittanceTexture", unusedTextureUnitNum++);
-        if(!solarIrradianceFixup_.empty())
-            prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
+        prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
         prog.setUniformValue("sunAngularRadius", 
float(tools_->sunAngularRadius()));
 
         auto precomputer = 
std::make_unique<EclipsedDoubleScatteringPrecomputer>(gl,
@@ -1848,8 +1842,7 @@
             prog.setUniformValue("sunDirection", toQVector(sunDirection()));
             prog.setUniformValue("sunAngularRadius", 
float(tools_->sunAngularRadius()));
             prog.setUniformValue("pseudoMirrorSkyBelowHorizon", 
tools_->pseudoMirrorEnabled());
-            if(!solarIrradianceFixup_.empty())
-                prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
+            prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
 
             if(tools_->onTheFlyPrecompDoubleScatteringEnabled())
             {
@@ -1890,8 +1883,7 @@
             prog.setUniformValue("sunDirection", toQVector(sunDirection()));
             prog.setUniformValue("sunAngularRadius", 
float(tools_->sunAngularRadius()));
             prog.setUniformValue("pseudoMirrorSkyBelowHorizon", 
tools_->pseudoMirrorEnabled());
-            if(!solarIrradianceFixup_.empty())
-                prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
+            prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
 
             auto& tex=*multipleScatteringTextures_[wlSetIndex];
             tex.setMinificationFilter(texFilter);
@@ -1920,8 +1912,7 @@
         prog.setUniformValue("sunDirection", toQVector(sunDirection()));
         prog.setUniformValue("sunAngularRadius", 
float(tools_->sunAngularRadius()));
         prog.setUniformValue("pseudoMirrorSkyBelowHorizon", 
tools_->pseudoMirrorEnabled());
-        if(!solarIrradianceFixup_.empty())
-            prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
+        prog.setUniformValue("solarIrradianceFixup", 
solarIrradianceFixup_[wlSetIndex]);
 
         auto& tex=*lightPollutionTextures_[wlSetIndex];
         tex.setMinificationFilter(texFilter);
@@ -2111,6 +2102,7 @@
     , luminanceRenderTargetTexture_(QOpenGLTexture::Target2D)
 {
     params_.parse(pathToData + "/params.atmo", 
AtmosphereParameters::ForceNoEDSTextures{false}, 
AtmosphereParameters::SkipSpectra{true});
+    resetSolarSpectrum();
 }
 
 void 
AtmosphereRenderer::setDrawSurfaceCallback(std::function<void(QOpenGLShaderProgram&
 shprog)> const& drawSurface)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CalcMySky-0.3.3/ShowMySky/GLWidget.cpp 
new/CalcMySky-0.3.5/ShowMySky/GLWidget.cpp
--- old/CalcMySky-0.3.3/ShowMySky/GLWidget.cpp  2024-09-08 18:59:00.000000000 
+0200
+++ new/CalcMySky-0.3.5/ShowMySky/GLWidget.cpp  2025-06-22 05:09:30.000000000 
+0200
@@ -226,6 +226,9 @@
 #define COLMOD_SRGBL_CHROMATICITY 4
 #define COLMOD_SRGBL_CHROMATICITY_TO_MAX 5
 #define COLMOD_HUE 6
+#define COLMOD_SRGB_RED 7
+#define COLMOD_SRGB_GREEN 8
+#define COLMOD_SRGB_BLUE 9
 
 in vec2 texCoord;
 out vec4 color;
@@ -342,6 +345,12 @@
         float maxValue = max(saturated.r, max(saturated.g, saturated.b));
         smoothColorOutput = sRGBTransferFunction(saturated / maxValue);
     }
+    else if(colorMode == COLMOD_SRGB_RED)
+        smoothColorOutput = XYZ2sRGB(exposure * tex.xyz).rrr;
+    else if(colorMode == COLMOD_SRGB_GREEN)
+        smoothColorOutput = XYZ2sRGB(exposure * tex.xyz).ggg;
+    else if(colorMode == COLMOD_SRGB_BLUE)
+        smoothColorOutput = XYZ2sRGB(exposure * tex.xyz).bbb;
     else
         smoothColorOutput = vec3(1,0,1);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CalcMySky-0.3.3/ShowMySky/GLWidget.hpp 
new/CalcMySky-0.3.5/ShowMySky/GLWidget.hpp
--- old/CalcMySky-0.3.3/ShowMySky/GLWidget.hpp  2024-09-08 18:59:00.000000000 
+0200
+++ new/CalcMySky-0.3.5/ShowMySky/GLWidget.hpp  2025-06-22 05:09:30.000000000 
+0200
@@ -28,6 +28,9 @@
         XYZChromaticity,
         sRGBlChromaticity,
         sRGBlChromaticityToMax,
+        sRGB_Red,
+        sRGB_Green,
+        sRGB_Blue,
     };
 
 private:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CalcMySky-0.3.3/ShowMySky/ToolsWidget.cpp 
new/CalcMySky-0.3.5/ShowMySky/ToolsWidget.cpp
--- old/CalcMySky-0.3.3/ShowMySky/ToolsWidget.cpp       2024-09-08 
18:59:00.000000000 +0200
+++ new/CalcMySky-0.3.5/ShowMySky/ToolsWidget.cpp       2025-06-22 
05:09:30.000000000 +0200
@@ -135,6 +135,9 @@
         colorMode_->addItem(tr("sRGBl chromaticity (smooth)"));
         colorMode_->addItem(tr("sRGBl chromaticity (bright)"));
         colorMode_->addItem(tr("Hue"));
+        colorMode_->addItem(tr("sRGB red"));
+        colorMode_->addItem(tr("sRGB green"));
+        colorMode_->addItem(tr("sRGB blue"));
 
         
colorMode_->setCurrentIndex(static_cast<int>(GLWidget::ColorMode::sRGB));
         connect(colorMode_, qOverload<int>(&QComboBox::currentIndexChanged), 
this, [this](const int index)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CalcMySky-0.3.3/cmake/CheckGLM.cmake 
new/CalcMySky-0.3.5/cmake/CheckGLM.cmake
--- old/CalcMySky-0.3.3/cmake/CheckGLM.cmake    2024-09-08 18:59:00.000000000 
+0200
+++ new/CalcMySky-0.3.5/cmake/CheckGLM.cmake    2025-06-22 05:09:30.000000000 
+0200
@@ -22,7 +22,7 @@
        add_library(glm::glm IMPORTED INTERFACE)
 else()
        CPMAddPackage(NAME glm
-               URL 
https://github.com/g-truc/glm/releases/download/0.9.9.8/glm-0.9.9.8.7z
-               URL_HASH 
SHA256=46d3ec588aaf270dab3ee0a2c70eb67aae7e6d245e067c412c1ef32070ad9299
+               URL https://github.com/g-truc/glm/archive/refs/tags/1.0.1.tar.gz
+               URL_HASH 
SHA256=9f3174561fd26904b23f0db5e560971cbf9b3cbda0b280f04d5c379d03bf234c
                EXCLUDE_FROM_ALL yes)
 endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CalcMySky-0.3.3/common/AtmosphereParameters.cpp 
new/CalcMySky-0.3.5/common/AtmosphereParameters.cpp
--- old/CalcMySky-0.3.3/common/AtmosphereParameters.cpp 2024-09-08 
18:59:00.000000000 +0200
+++ new/CalcMySky-0.3.5/common/AtmosphereParameters.cpp 2025-06-22 
05:09:30.000000000 +0200
@@ -619,7 +619,7 @@
     {
         throw DataLoadError{"Wavelengths aren't specified in atmosphere 
description"};
     }
-    if(solarIrradianceAtTOA.empty() && !skipSpectra)
+    if(solarIrradianceAtTOA.empty())
     {
         throw DataLoadError{"Solar irradiance at TOA isn't specified in 
atmosphere description"};
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CalcMySky-0.3.3/common/fourier-interpolation.hpp 
new/CalcMySky-0.3.5/common/fourier-interpolation.hpp
--- old/CalcMySky-0.3.3/common/fourier-interpolation.hpp        2024-09-08 
18:59:00.000000000 +0200
+++ new/CalcMySky-0.3.5/common/fourier-interpolation.hpp        2025-06-22 
05:09:30.000000000 +0200
@@ -1,6 +1,7 @@
 #ifndef INCLUDE_ONCE_3A48838B_2D1A_4326_9585_2E19F9D300D1
 #define INCLUDE_ONCE_3A48838B_2D1A_4326_9585_2E19F9D300D1
 
+#include <cassert>
 #include <algorithm>
 #include <unsupported/Eigen/FFT>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CalcMySky-0.3.3/shaders/render.frag 
new/CalcMySky-0.3.5/shaders/render.frag
--- old/CalcMySky-0.3.3/shaders/render.frag     2024-09-08 18:59:00.000000000 
+0200
+++ new/CalcMySky-0.3.5/shaders/render.frag     2025-06-22 05:09:30.000000000 
+0200
@@ -132,6 +132,7 @@
 
     CONST float cosSunZenithAngle =dot(zenith,sunDirection);
     CONST float dotViewSun=dot(viewDir,sunDirection);
+    CONST float sinViewSunAngle=length(cross(viewDir,sunDirection));
 
 #if RENDERING_ANY_SINGLE_SCATTERING
     vec4 phaseFuncValue = currentPhaseFunction(dotViewSun);
@@ -162,7 +163,7 @@
         radiance = 
transmittanceToGround*groundAlbedo*groundIrradiance*solarIrradianceFixup*groundBRDF
                  + 
lightPollutionGroundLuminance*lightPollutionRelativeRadiance;
     }
-    else if(dotViewSun>cos(sunAngularRadius))
+    else if(sinViewSunAngle<sin(sunAngularRadius) && dotViewSun > 0)
     {
         if(lookingIntoAtmosphere)
             radiance=transmittanceToAtmosphereBorder(cosViewZenithAngle, 
altitude)*solarRadiance();
@@ -177,6 +178,7 @@
     radianceOutput=radiance;
 #elif RENDERING_ECLIPSED_ZERO_SCATTERING
     vec4 radiance;
+    CONST float 
sinViewMoonAngle=length(cross(viewDir,normalize(moonPosition-cameraPosition)));
     CONST float 
dotViewMoon=dot(viewDir,normalize(moonPosition-cameraPosition));
     if(viewRayIntersectsGround)
     {
@@ -194,7 +196,8 @@
         radiance = 
transmittanceToGround*groundAlbedo*groundIrradiance*solarIrradianceFixup*groundBRDF
                  + 
lightPollutionGroundLuminance*lightPollutionRelativeRadiance;
     }
-    else if(dotViewSun>cos(sunAngularRadius) && 
dotViewMoon<cos(moonAngularRadius(cameraPosition,moonPosition)))
+    else if(sinViewSunAngle<sin(sunAngularRadius) && dotViewSun > 0 &&
+            
sinViewMoonAngle>sin(moonAngularRadius(cameraPosition,moonPosition)) && 
dotViewMoon > 0)
     {
         if(lookingIntoAtmosphere)
             radiance=transmittanceToAtmosphereBorder(cosViewZenithAngle, 
altitude)*solarRadiance();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CalcMySky-0.3.3/shaders/texture-coordinates.frag 
new/CalcMySky-0.3.5/shaders/texture-coordinates.frag
--- old/CalcMySky-0.3.3/shaders/texture-coordinates.frag        2024-09-08 
18:59:00.000000000 +0200
+++ new/CalcMySky-0.3.5/shaders/texture-coordinates.frag        2025-06-22 
05:09:30.000000000 +0200
@@ -390,7 +390,7 @@
     indicesCurrRow[2] =     currRow;
     indicesNextRow[2] = min(currRow+1, scatteringTextureSize[2]-1);
 
-    // The caller will handle the internal interpolation guides: the ones 
between rows in each 2D "picture".
+    // The callee will handle the internal interpolation guides: the ones 
between rows in each 2D "picture".
     CONST vec4 logValCurrRow = sample3DTextureGuided01_log(tex, 
interpolationGuides01Tex, indicesCurrRow);
     CONST vec4 logValNextRow = sample3DTextureGuided01_log(tex, 
interpolationGuides01Tex, indicesNextRow);
     return exp((logValNextRow-logValCurrRow) * posBetweenRows + logValCurrRow);

Reply via email to