From 569c088bcc042e4fb843831aaa57ce17b5760238 Mon Sep 17 00:00:00 2001 From: Spoike Date: Tue, 18 Jan 2005 21:05:43 +0000 Subject: [PATCH] works on ATI cards now git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@814 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_rmain.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/engine/gl/gl_rmain.c b/engine/gl/gl_rmain.c index 5168aedbb..65451162e 100644 --- a/engine/gl/gl_rmain.c +++ b/engine/gl/gl_rmain.c @@ -179,10 +179,10 @@ void GL_InitSceneProcessingShaders (void) {\ float amptemp;\ vec3 edge;\ - edge = texture2D( theTexture2, v_texCoord2 );\ + edge = texture2D( theTexture2, v_texCoord2 ).rgb;\ amptemp = ampscale * edge.x;\ vec3 offset;\ - offset = texture2D( theTexture1, v_texCoord1 );\ + offset = texture2D( theTexture1, v_texCoord1 ).rgb;\ offset.x = (offset.x - 0.5) * 2.0;\ offset.y = (offset.y - 0.5) * 2.0;\ vec2 temp;\ @@ -200,6 +200,9 @@ void GL_InitSceneProcessingShaders (void) scenepp_ww_program = GLSlang_CreateProgram(vert, frag); + if (!scenepp_ww_program) + return; + scenepp_ww_parm_texture0i = GLSlang_GetUniformLocation(scenepp_ww_program, "theTexture0"); scenepp_ww_parm_texture1i = GLSlang_GetUniformLocation(scenepp_ww_program, "theTexture1"); scenepp_ww_parm_texture2i = GLSlang_GetUniformLocation(scenepp_ww_program, "theTexture2");