~ubuntu-branches/ubuntu/quantal/mupen64plus/quantal

« back to all changes in this revision

Viewing changes to debian/patches/rice_fog.patch

  • Committer: Bazaar Package Importer
  • Author(s): Sven Eckelmann, Sven Eckelmann, Piotr Ożarowski
  • Date: 2010-05-06 11:34:46 UTC
  • mfrom: (3.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100506113446-jfcd6uk7waudel82
Tags: 1.5+dfsg1-10
[ Sven Eckelmann ]
* debian/patches:
  - Add rsp_ucode2_reset.patch, Reset status of specific ucode2 hacks after
    starting again
  - Add rsp_hle_bigendian.patch, Fix wrong high level emulation of rsp on big
    endian systems
  - Add rice-crash-vendorstring.patch, Don't crash on long OpenGL vendor
    string (Closes: #580480, LP: #575968)

[ Piotr Ożarowski ]
* DMUA flag set to yes

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Reduce flickering when enabling fog in rice
 
2
 When enabling fog in rice video plugin some polygons near the camera starts to
 
3
 flicker, turn to white or disappear completely. This happens due to negative
 
4
 fog coords send to OpenGL. This is invalid and should be clamped to 0.0 in that
 
5
 case.
 
6
Bug: http://code.google.com/p/mupen64plus/issues/detail?id=30
 
7
Author: Jonathan Kleinehellefort <jk@molb.org>
 
8
 
 
9
---
 
10
diff --git a/rice_video/RenderBase.cpp b/rice_video/RenderBase.cpp
 
11
index a5dcc2e716c8b5ea9c4a88bdf70815f4a2912ce4..16372271c500872abc7e9ed6fba4482ed7ce1a99 100644
 
12
--- a/rice_video/RenderBase.cpp
 
13
+++ b/rice_video/RenderBase.cpp
 
14
@@ -854,7 +854,7 @@ void InitVertex(uint32 dwV, uint32 vtxIndex, bool bTexture, bool openGL)
 
15
         g_vtxProjected5[vtxIndex][1] = g_vtxTransformed[dwV].y;
 
16
         g_vtxProjected5[vtxIndex][2] = g_vtxTransformed[dwV].z;
 
17
         g_vtxProjected5[vtxIndex][3] = g_vtxTransformed[dwV].w;
 
18
-        g_vtxProjected5[vtxIndex][4] = g_vecProjected[dwV].z;
 
19
+        g_vtxProjected5[vtxIndex][4] = max(0.0, g_vecProjected[dwV].z);
 
20
 
 
21
         if( g_vtxTransformed[dwV].w < 0 )   g_vtxProjected5[vtxIndex][4] = 0;
 
22
         g_vtxIndex[vtxIndex] = vtxIndex;