From 5a87d20e6e7d71322416a00888d308088de1d838 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 24 Dec 2012 15:48:36 +0000 Subject: [PATCH] neercs: fix background colour computations with shader model 3. --- neercs/video/text.lolfx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/neercs/video/text.lolfx b/neercs/video/text.lolfx index 718db54..56a16da 100644 --- a/neercs/video/text.lolfx +++ b/neercs/video/text.lolfx @@ -45,12 +45,12 @@ void main() #else vec4 tmp_Attr = in_Attr * 255.0; - float A = 0.0; - float B = 0.0; - float C = 0.0; - float D = 0.0; + float A = floor(tmp_Attr.w / 32.0) / 7.0; + float B = mod(floor(tmp_Attr.w / 2.0), 16.0) / 15.0; + float C = (mod(tmp_Attr.w, 2.0) * 8.0 + floor(tmp_Attr.z / 32.0)) / 15.0; + float D = mod(floor(tmp_Attr.z / 4.0), 8.0) / 7.0; - float E = 0.0; + float E = (mod(tmp_Attr.z, 4.0) * 2.0 + floor(tmp_Attr.y / 128.0)) / 7.0; float F = mod(floor(tmp_Attr.y / 8.0), 16.0) / 15.0; float G = (mod(tmp_Attr.y, 8.0) * 2.0 + floor(tmp_Attr.x / 128.0)) / 15.0; float H = mod(floor(tmp_Attr.x / 16.0), 8.0) / 7.0;