Shaders

Shaders

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
Mugslugs
Posts: 89
Joined: 23 Aug 2005, 00:08

Shaders

Post by Mugslugs »

Ok firstly this thread is for the development and secondly discusion of shaders, I have slightly altered the water shader to have small waves technicly there are none but it looks nice (only fragment shader). I did this by adding temp3 with the bumpMul parameter.
Note it is a very subtle effect as there is no height change only the texture is, Image difference can only bee seen in fullscreen as it is small however i included a screenshot in the zip. http://www.fileuniverse.com/?p=showitem&ID=2701
Last edited by Mugslugs on 18 Mar 2006, 21:56, edited 1 time in total.
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

Cool! As SJ's new uber-rshader will need a crapload of GPU power to run, i can very easily see this becomign a standard option until we all have 1.5 gigs of GPU mem :P
Mugslugs
Posts: 89
Joined: 23 Aug 2005, 00:08

Post by Mugslugs »

http://www.fileuniverse.com/?p=showitem&ID=2701 now with cloud flavor other than the rainbow they are more cloud like, btw should be faster. I will introduce more dynamic lighting when i get spring to compile, eg when it is darker the clouds will not turn purple rather than grey etc.

ps SJ that looks great i can run that on my new rig, woo hoo half way two quad sli 2 x 7900 gtx, two questions how did you get the extensions running, i;m stuck with opengl fp 1.0 and two could i take a look at the shader to try and optimise it a bit and / convert to glsl to allow dynamic compilation
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

I don't suppose you could play around with the shadows? They're a major performance problem at the moment, and if there was at least an option for simple blob shadows, a lot've lower-end people would thank you.
Mugslugs
Posts: 89
Joined: 23 Aug 2005, 00:08

Post by Mugslugs »

i would mess around with the shadows if i could compile spring because most of the performance loss is because it is mostly done on the cpu not balanced. plus i would try to do it in 2 render passes
SJ
Posts: 618
Joined: 13 Aug 2004, 17:13

Post by SJ »

Ehm the shadows are more or less completly computed on the gpu, the only thing the cpu does is send the models that creates them. And its already done in two rendering passes.

As for the new water rendering its made up of about 10 different shaders that doesnt make much sense without the c++ code keeping them together which I wont release until its working well.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

SJ wrote:Ehm the shadows are more or less completly computed on the gpu, the only thing the cpu does is send the models that creates them. And its already done in two rendering passes.
Shadows still need work, they're nice but kick the absolute crap out of my framerate.
User avatar
Masse
Damned Developer
Posts: 979
Joined: 15 Sep 2004, 18:56

Post by Masse »

real time shadows usually do that... and how many other RTS's use real time shadows everywhere :wink:
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

I figured that shadows were being done on the GPU.

For people like me, who have high-end GPUs, it's not too big of a deal, so long as I don't have FSAA and AF turned up a lot, but I think that a simple blob shadow using a generic circle might be nice for low-end users. At any rate, it's very un-important, compared to the many other things I've put on Mantis, so I won't bother y'all with this any more.

Personally, I'd rather see bugs fixed and modding areas extended, than worry about the graphical flash of the engine very much- it's already very flashy, most modders aren't really using what's available yet, and I'd rather see it get solid.
hawkki
Posts: 222
Joined: 01 Jan 2006, 19:47

Post by hawkki »

The fact is that with proper coding the shadows could be made many times faster. This howewer would require lots of work and since no-one gets paid coding spring we should not expect someone to sit in front of the computer just rewriting shadow generation code as it is not even close to the most important things to develop.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

According to the answers I read there from SJ, shadows are already executed by the GPU, hence they're probably running fairly quickly, with the obvious caveat that they may not be well-optimized for ATi and nVidia chipsets yet. If you're implying that shadows can be much faster if the programmers were just paid something besides praise, I'd have to answer in the negative- it's clear that while they could be somewhat optimized, they're already fairly efficient. Please do not read criticism into technical discussions if you don't understand what is being said- we're all working for free here, because we like making good games, and I understand that the developers are not my personal slaves ;)

Hence why I was asking for a (relatively) simple blob-shadow option, using a generic shadowmap to project under the units, and made larger or smaller depending on the radius of the S3O or 3DO, +/- some fudge variable. Pretty old-skool and not very pretty, granted, but better than no shadow at all.
Post Reply

Return to “Engine”