From 9b4dcc809e7ed4ed3f36ab82d811ff61bb254afc Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Mon, 15 Apr 2019 21:59:03 -0500 Subject: [PATCH] OpenGL2: Fix compiling lightall GLSL on OpenGL 2.1 textureCubeLod() requires OpenGL 3.0 / GLSL 1.30. Added in 2018-12-21 commit e5da13f14635b6accc5eefd6986de03d2cff9662 "OpenGL2: r_cubemapping 2 for box cubemap parallax." Report by brugal and Simon McVittie. Bug-Debian: https://bugs.debian.org/923226 --- code/renderergl2/glsl/lightall_fp.glsl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/renderergl2/glsl/lightall_fp.glsl b/code/renderergl2/glsl/lightall_fp.glsl index 027b54a5..26f9a995 100644 --- a/code/renderergl2/glsl/lightall_fp.glsl +++ b/code/renderergl2/glsl/lightall_fp.glsl @@ -222,7 +222,7 @@ float CalcLightAttenuation(float point, float normDist) return attenuation; } - +#if defined(USE_BOX_CUBEMAP_PARALLAX) vec4 hitCube(vec3 ray, vec3 pos, vec3 invSize, float lod, samplerCube tex) { // find any hits on cubemap faces facing the camera @@ -252,6 +252,7 @@ vec4 hitCube(vec3 ray, vec3 pos, vec3 invSize, float lod, samplerCube tex) //return vec4(textureCubeLod(tex, tc, lod).rgb * fade, fade); return vec4(textureCubeLod(tex, tc, lod).rgb, 1.0); } +#endif void main() {