July 2018

GLSL Astronomy compute shader

Today I present you my GLSL Astronomy compute shader, which I use in my demo productions and games. ☺

// Copyright (C) 2018, Benjamin "BeRo" Rosseaux (benjamin@rosseaux.de) - License: CC0// Hint: It's not super accurate, but it should be good enough for games and demos with sky rendering.#version 430
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
uniform vec3 tc; // Time constant
layout(std430) buffer ssboAstronomy { vec3 sunPosition; float sunDistance; vec3 moonPosition; float moonDistance; float moonPhase; mat3 celestialTransform; };
const float HalfPI = 1.5707963267948966, // 1.570796326794896619231, PI = 3.141592653589793, // 3.141592653589793238463, PI2 = 6.283185307179586; // 6.283185307179586476925
// The AMD windows GPU drivers do not seem to like constant double precision values here, // so no const prefix in this case.double astronomicalUnitsToKiloMeters = 149597871.0;
const vec2 sinCosOffsets = vec2(0.0, HalfPI);
double(read more)

Successful PasVulkan test on an AMD Radeon RX580 8GB graphics card

Successful PasVulkan test on an AMD Radeon RX580 8GB graphics card, so it seems that PasVulkan now seems to work with NVIDIA, AMD, Mali, Adreno and Intel GPUs, although with Intel GPUs it does only under Linux correctly, under Windows however not (due to a still non-fixed Windows Intel graphics driver issue). And with PowerVR GPUs it still crashes right at the startup.