Hard Light Productions Forums
General FreeSpace => FreeSpace & FreeSpace Open Support => Topic started by: Colonol Dekker on July 16, 2009, 04:43:34 pm
-
I'm running two SLI linked Geforce 8600GTs. I've noticed the term shaders used extensively on my forays into this board. I'm not ashamed to say i've no idea what they are in relation to the SCP engine. I've never used any before and am curious as to how i can make the SCP even more Bee-yoo-tee-full.
Some guidance/advice in this matter would be appreciated. Thanks :yes:
-
Shaders are 'scripts' that tell the graphic engine how and what to render for certain materials, a 'standard' shader, for example, would tell the system to render colour as colour, shine as shine etc, but the language itself allows for a lot of flexibility. Things like faux-refraction on glass, or special effects can be scripted into the game, rather than hard coded into the graphics engine.
As for learning to write them... Still working on that bit :nervous:
-
I noticed that SOL uses them on the Harlock (found it on youtube) and wondered if there were any going that i missed during my hiatus.
Do they have to be FS2 specific or would my card manufacturer have a generic set of "improve-all/any" like bloom etc?
-
Well, for starters, if you enable normal maps in the Launcher, you will see added awesomeness on most ships in the mediavps.
-
Appreciate the answer E or The_E, (which do you prefer?) but i'm not that idiotic with my SCP experience :lol:
-
I noticed that SOL uses them on the Harlock (found it on youtube) and wondered if there were any going that i missed during my hiatus.
Do they have to be FS2 specific or would my card manufacturer have a generic set of "improve-all/any" like bloom etc?
There are a set of shaders that come with the latest .vps, can't remember the filename. I know some people were using a generic bloom filter for a while with SCP, but I think the technology that supported that went defunct.
I suppose the best place to start would be to unpack the shaders vp and look at the ones that already exist, but be prepared for brain-melt ;)
That said, the shaders themselves should default to being automatically 'on', so you should already be getting the benefit of them.
-
Umm, i downloaded complete.vp, i assume (possibly) that they are are in a shaders folder?
/me goes to look.....
It's late now so i'm heading of to sleepytown. I'll update tomorrow night.
Cheers everyone.
-
Is it possible to make motion blur using shaders?
What the current shader pack do?(what visible changes except normal maps)
-
You'd need someone more experienced at shaders to give you more detail to be honest, someone like Vasudan Admiral or, I think, Nuke understand far more of the shader details than I do.
Theoretically, yes, Shaders should allow you to do things like motion blur, but I really have no idea how much functionality of shaders is available to the SCP.
Edit: Freespace Wiki has some stuff on it:
http://www.hard-light.net/wiki/index.php/OpenGL_Shaders_(GLSL)#Description_of_shaders
-
If you're using the MV_Complete, then you're already using the shaders.
The shaders in FSO are making things 'shiny', 'semi-transparent', and lighting things - fire a primary weapon close by a ship and watch it light up - that's the shaders in action.
In a bit more detail:
There are two kinds of shaders:
A) Vertex Shaders.
These 'transform' the raw vertices of the models (the ships, missiles etc) to how they should look from the camera (your viewpoint).
They only know the X,Y,Z coordinates of the specific vertex, plus 'global-per-model' and 'global-per-viewpoint' information.
B) Pixel or Fragment Shaders (DirectX calls these Pixel shaders, OpenGL calls these Fragment shaders)
These 'colour in' the objects - they apply light and shade, the textures etc.
These only know things interpolated between vertices, plus 'global-per-model' (eg texture) and 'global-per-viewpoint' (eg lights) information.
However, there are several fundamental limitations of shaders:
1) They don't know how things are connected together - thus you can't calculate shadows here. You have to work out the shadow map/stencil buffer first, then get the shader to apply it.
2) They don't know how things move - unless you manually tell them. So you could do motion blur, but you'd have to manually tell the shader how it was moving.
What they do is officially called "Transformation and Lighting", but that can mean... anything really.
-
Ok. This is informative :yes: I extracted my complete.vp last night. Which folder do the shaders reside in? Or are they compiled meaning when I try and open them in notepad i'll just recieve gibberish?
I get what shaders do now, to a barest extent how they do it. . But i'm not sure how they operate as scp plugins. I know they used to be compiled as part of the executable, also I know that this is no longer the case. Sorry if I sound all over the place but i'm on a train passing city thameslink and it's mania.
-
Which folder do the shaders reside in?
I've seen references that the .sdr files reside in \data\effects\ .