DarkPlaces engine modification - (a bit) faster shadows

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

Postby LordHavoc » Fri Sep 04, 2009 6:37 pm

Not really, at least until I realized that each arrow is carefully pointing at a shadow on the FRONT of the ledge, are these bidirectional shadows of some kind? :)
LordHavoc
Site Admin
 
Posts: 191
Joined: Wed Mar 29, 2006 7:39 am
Location: western Oregon, USA

Postby tomasz.swierczek » Fri Sep 04, 2009 6:38 pm

FruitieX wrote:Do it from SVN trunk the next time, so it'll be easier to apply and up to date.
svn://svn.icculus.org/twilight/trunk/darkplaces

Also as for the screenshot: http://pics.nexuizninjaz.com/images/o9j ... 2emk4b.jpg

Hopefully makes sense. :-P


OK, those little arrows are really helpful, I haven't noticed earlier. Thanks a lot!
tomasz.swierczek
Newbie
 
Posts: 8
Joined: Wed Aug 26, 2009 2:28 pm

Postby tomasz.swierczek » Mon Sep 07, 2009 3:59 pm

LordHavoc wrote:Not really, at least until I realized that each arrow is carefully pointing at a shadow on the FRONT of the ledge, are these bidirectional shadows of some kind? :)


In fact... yes, these actually were "bidirectional shadows" because I've made a really, really stupid mistake in GLSL shader code :-)

I've changed it now - here is the patch (from Nexuiz SVN version I've downloaded on Friday last week, as everyone wanted):

https://students.mimuw.edu.pl/~ts248384 ... vec4.patch

changes:

- uses vec4 instead of vec3 for dynamic shadows (no texcoord1f, only vertices)
- uses r_SetupShader_Permutation && that uber shader code
- looks as it should (no bidirectional shadows)

hope it will work :)
tomasz.swierczek
Newbie
 
Posts: 8
Joined: Wed Aug 26, 2009 2:28 pm

Postby FruitieX » Mon Sep 07, 2009 4:27 pm

Seems to work fine now, I got a tiny performance boost of 1 fps (from 13.5 to 14.4) by using the patch. I'm getting warnings during compile though:

Code: Select all
r_shadow.c: In function ‘R_Shadow_VolumeFromList’:
r_shadow.c:1247: warning: passing argument 2 of ‘R_SetupGPUExtrusionShader’ discards qualifiers from pointer target type


Edit: oh wait, it seems to crash the GLSL shaders, which disables deluxemapping/offsetmapping. I get this error in the DP console:
Code: Select all
<19:19:56> GLSL shader glsl/default.glsl depth/shadow failed!  some features may not work properly.
<19:19:56> OpenGL 2.0 shaders disabled - unable to find a working shader permutation fallback on this driver (set r_glsl 1 if you want to try again)
FruitieX
Keyboard killer
 
Posts: 588
Joined: Mon Nov 13, 2006 4:47 pm
Location: Finland

Postby tomasz.swierczek » Mon Sep 07, 2009 6:15 pm

FruitieX wrote:Seems to work fine now, I got a tiny performance boost of 1 fps (from 13.5 to 14.4) by using the patch. I'm getting warnings during compile though:

Code: Select all
r_shadow.c: In function ‘R_Shadow_VolumeFromList’:
r_shadow.c:1247: warning: passing argument 2 of ‘R_SetupGPUExtrusionShader’ discards qualifiers from pointer target type


Edit: oh wait, it seems to crash the GLSL shaders, which disables deluxemapping/offsetmapping. I get this error in the DP console:
Code: Select all
<19:19:56> GLSL shader glsl/default.glsl depth/shadow failed!  some features may not work properly.
<19:19:56> OpenGL 2.0 shaders disabled - unable to find a working shader permutation fallback on this driver (set r_glsl 1 if you want to try again)


what is your GPU?

probably there is a mistake in that builtin shader string, I am just fixing it (hell... so many #define's...)

Edit:

try this one:

http://students.mimuw.edu.pl/~ts248384/ ... c4_2.patch

on mine GPU (NVIDIA GF 8600 GT) it's fine
tomasz.swierczek
Newbie
 
Posts: 8
Joined: Wed Aug 26, 2009 2:28 pm

Postby FruitieX » Mon Sep 07, 2009 6:53 pm

tomasz.swierczek wrote:what is your GPU?

NVIDIA GF 9500 GS

tomasz.swierczek wrote:Edit:

try this one:

http://students.mimuw.edu.pl/~ts248384/ ... c4_2.patch

Cool, testing now.

Am running Gentoo Linux, btw.

Edit: Yeah, it works now. :)
FruitieX
Keyboard killer
 
Posts: 588
Joined: Mon Nov 13, 2006 4:47 pm
Location: Finland

Postby tomasz.swierczek » Mon Sep 07, 2009 9:48 pm

FruitieX wrote:Edit: Yeah, it works now. :)


Hurray! :D thanks for testing, FruitieX :)
tomasz.swierczek
Newbie
 
Posts: 8
Joined: Wed Aug 26, 2009 2:28 pm

Postby Blµb » Wed Sep 09, 2009 10:07 am

*cough* :(
no improvement on my GeForce 7950 GX2 / Core 2 Duo E6600

This GPU/CPU combination seems to be flawed in many ways. There are many situations where I just get ridiculously low FPS where other people don't notice a thing...
Blµb
Alien trapper
 
Posts: 277
Joined: Thu Mar 29, 2007 1:49 pm

Postby parasti » Wed Sep 09, 2009 11:24 am

For what it's worth, this patch completely breaks shadows on GF4MX. I suspect a missing feature is not being detected properly.
parasti
Alien
 
Posts: 110
Joined: Sun May 11, 2008 11:32 pm
Location: On the walls and the ceiling

Postby LordHavoc » Wed Sep 09, 2009 7:02 pm

tomasz.swierczek wrote:probably there is a mistake in that builtin shader string, I am just fixing it (hell... so many #define's...)


Be sure to use developer 1 or higher when testing shaders, otherwise you don't get the errors/warnings the driver wants to report.

I ought to make all debug builds default to developer 1 too...
LordHavoc
Site Admin
 
Posts: 191
Joined: Wed Mar 29, 2006 7:39 am
Location: western Oregon, USA

Previous

Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron