Skip to content

Commit

Permalink
Merge branch 'release/4.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
naavis committed Aug 26, 2021
2 parents 4733e53 + c79bed3 commit 2b742a5
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 4.0.1 - 2021-08-26

### Fixed

- 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

### Added
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,8 @@ Finally build the project by running:

```bash
mkdir build
cd src
qmake main.pro -o ..\build\
cd ..\build
cd build
qmake ../src/haloray.pro
make
```

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "4.0.0-{build}"
version: "4.0.1-{build}"
branches:
only:
- master
Expand Down
8 changes: 6 additions & 2 deletions src/haloray-core/resources/shaders/guide.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
3 changes: 3 additions & 0 deletions src/haloray-core/resources/shaders/raytrace.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,9 @@ void main(void)
vec2 projected = camera.focalLength * projectionFunction * vec2(aspectRatio * cos(polarAngle), sin(polarAngle));
vec2 normalizedCoordinates = 0.5 + projected;

if (any(lessThanEqual(normalizedCoordinates, vec2(0.0))) || any(greaterThanEqual(normalizedCoordinates, vec2(1.0))))
return;

float sunRadiance;
if (atmosphereEnabled == 1)
{
Expand Down

0 comments on commit 2b742a5

Please sign in to comment.