diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f5f730..d4c7e79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,8 +10,9 @@ and this project adheres to ### Fixed -- Writes to the outside of the result texture end up back inside the texture - on some Intel GPUs on Linux. Now they are correctly discarded again. +- Fixed bug where writes outside texture bounds ended up inside the texture + on some Intel GPUs on Linux +- Fixed guide marking shader to compile on Linux and Intel GPUs ## 4.0.0 - 2021-08-25 diff --git a/src/haloray-core/resources/shaders/guide.glsl b/src/haloray-core/resources/shaders/guide.glsl index 3577072..e4c36bb 100644 --- a/src/haloray-core/resources/shaders/guide.glsl +++ b/src/haloray-core/resources/shaders/guide.glsl @@ -25,8 +25,12 @@ uniform struct camera_t #define PROJECTION_ORTHOGRAPHIC 4 const float PI = 3.1415926535; -const float LINEWIDTHDEGREES = 0.25 / sqrt(camera.focalLength); -const float LINEWIDTH = LINEWIDTHDEGREES * PI / 180.0; +// The following constants cannot be set to +// `const` because the value depends on a +// shader uniform, and consts must be +// initialized with a constant expression. +float LINEWIDTHDEGREES = 0.25 / sqrt(camera.focalLength); +float LINEWIDTH = LINEWIDTHDEGREES * PI / 180.0; vec2 planarToPolar(vec2 point) {