From a61dbbdd9f813ab390e475257b0e6adc991c4113 Mon Sep 17 00:00:00 2001 From: RobertBeckebans Date: Sun, 20 Apr 2014 17:04:04 +0200 Subject: [PATCH] Cg shader fixes for Mesa and Qualcomm drivers #90 --- base/renderprogs/bink_gui.vertex | 3 ++- base/renderprogs/gui.vertex | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/base/renderprogs/bink_gui.vertex b/base/renderprogs/bink_gui.vertex index fbe8a535..63bc3c23 100644 --- a/base/renderprogs/bink_gui.vertex +++ b/base/renderprogs/bink_gui.vertex @@ -3,6 +3,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. +Copyright (C) 2013 Robert Beckebans This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). @@ -51,6 +52,6 @@ void main( VS_IN vertex, out VS_OUT result ) { result.position.w = dot4( vertex.position, rpMVPmatrixW ); result.texcoord0.xy = vertex.texcoord.xy; - result.texcoord1 = ( swizzleColor( vertex.color2 ) * 2 ) - 1; + result.texcoord1 = ( swizzleColor( vertex.color2 ) * 2.0 ) - 1.0; result.color = swizzleColor( vertex.color ); } diff --git a/base/renderprogs/gui.vertex b/base/renderprogs/gui.vertex index fbe8a535..63bc3c23 100644 --- a/base/renderprogs/gui.vertex +++ b/base/renderprogs/gui.vertex @@ -3,6 +3,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. +Copyright (C) 2013 Robert Beckebans This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). @@ -51,6 +52,6 @@ void main( VS_IN vertex, out VS_OUT result ) { result.position.w = dot4( vertex.position, rpMVPmatrixW ); result.texcoord0.xy = vertex.texcoord.xy; - result.texcoord1 = ( swizzleColor( vertex.color2 ) * 2 ) - 1; + result.texcoord1 = ( swizzleColor( vertex.color2 ) * 2.0 ) - 1.0; result.color = swizzleColor( vertex.color ); }