Search
lxdream.org :: lxdream/src/pvr2/scene.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/scene.c
changeset 1257:e1314ad3e7cc
prev1240:190df8a791ca
next1298:d0eb2307b847
author nkeynes
date Sun Mar 04 21:28:48 2012 +1000 (8 years ago)
permissions -rw-r--r--
last change Fix have_shaders in glrender.c
Set negative fog for lut when using shaders
file annotate diff log raw
1.1 --- a/src/pvr2/scene.c Tue Feb 28 17:25:26 2012 +1000
1.2 +++ b/src/pvr2/scene.c Sun Mar 04 21:28:48 2012 +1000
1.3 @@ -385,8 +385,11 @@
1.4 uint32_t index = pvr2_scene.poly_array[i].vertex_index;
1.5 if( mode == PVR2_POLY_FOG_LOOKUP ) {
1.6 for( j=0; j<pvr2_scene.poly_array[i].vertex_count; j++ ) {
1.7 - pvr2_scene.vertex_array[index+j].offset_rgba[3] =
1.8 - scene_compute_lut_fog_vertex( pvr2_scene.vertex_array[index+j].z, fog_density, fog_table );
1.9 + float fog = scene_compute_lut_fog_vertex( pvr2_scene.vertex_array[index+j].z, fog_density, fog_table );
1.10 + if( display_driver->capabilities.has_sl )
1.11 + pvr2_scene.vertex_array[index+j].offset_rgba[3] = -fog;
1.12 + else
1.13 + pvr2_scene.vertex_array[index+j].offset_rgba[3] = fog;
1.14 }
1.15 } else if( mode == PVR2_POLY_FOG_LOOKUP2 ) {
1.16 for( j=0; j<pvr2_scene.poly_array[i].vertex_count; j++ ) {
.