Author Topic: Finally - Bloom for nVidia-Users (Windows - OpenGL)  (Read 23915 times)

0 Members and 1 Guest are viewing this topic.

Offline neoterran

  • 210
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
probably you want to aim for 2.0 shaders since those are the mostly widely supported version that allow for long programs. All cards since Geforce FX (2003) and Radeon 9500 (2003) and up support these, this is the widest base. Also, Geforce FX doesn't suffer from performance problems in OpenGL, if the wiki entry is to be believed :

Quote
However, the GeForce FX still remained competitive in OpenGL applications, which can be attributed to the fact that most OpenGL applications use manufacturer-specific extensions to support advanced features on various hardware and to obtain the best possible performance, since the manufacturer-specific extension would be perfectly optimized to the target hardware.

However, i'm not a graphics programmer and have very limited knowledge of OpenGL or DirectX. Hopefully Taylor could shed some more light on specifics.
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
The attempt is going to be to have a tbm that can have multiple versions of the same effect.  The code will parse the tbm and get the best version that the hardware appears to accept.  It's just going to be a matter of whether or not someone writes a shader in that version for that particular effect.  There won't be different tbms for each version of each effect, it will all be in the tbm for that effect.  That will hopefully make it easy to not only keep track of but also upgrade and modify in the future.  At first it's going to be 2.0+, then I'll add some more code to support other languages/versions where possible.

The basic idea would be to have a bloom.fsh ("Freespace SHader", the extension will probably change though, to close to "fish" :)) which would have a section for each shader language/version that someone makes, and then be split into vertex and fragment sections.  The code will initially handle any number of different versions in the tbm (just to maintain backwards compatibility for improved effects), even if the game wouldn't be able to actually use them.

There will be a tbm for fullscreen effects, which would call the .fsh files, and those would be executed on a fullscreen basis (ie, bloom effects, sharpen effects, etc).  Then you will also be able to have ship/weapon tbl entries for shaders for a specific ship model or weapon, these would typically be something that doesn't require the framebuffer to work out (unlike the bloom effect).  Then I also want to either create a new table for general effect shaders (explosions, warp, etc.) or try to incorporate that into the existing tbls for those things.

There is time to work all of that out though.  The first test will be more limited, mainly the fullscreen effects and some basic ship-specific shader support.  If that goes well then the rest of the details will be finalized (obviously with mod support and a fair bit of input from DaBrain, Wanderer, Axem, ..., etc.).  Then there will probably be one more test build after that which will have more shader support, then it will hit CVS.

 

Offline S-99

  • MC Hammer
  • 210
  • A one hit wonder, you still want to touch this.
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
Hey this is really awesome. Much nicer than the hdrish or hdrish-lite smartshaders(hdrish fake hdr's your hud). I saw the screenshots of the software implemented bloom, and while hardware ones will be obviously superior in many ways. The software ones made the game look like the cutscenes, only in much higher resolution.
Every pilot's goal is to rise up in the ranks and go beyond their purpose to a place of command on a very big ship. Like the colossus; to baseball bat everyone.

SMBFD

I won't use google for you.

An0n sucks my Jesus ring.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
are we ever gonna get that materials system or has that been canned?
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
are we ever gonna get that materials system or has that been canned?
You'll have to ask Bobboau, I've got nothing to do with that.

 
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
I think we're not limited to a special shader version.

Of course we shouldn't blindly use 3.0 shaders, but afair 1.3 is pretty limited.

Valve didn't think so. I am playing Half-Life 2 again these days and they used some pretty decent v1.3-shaders.

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
The difference between version 1.1 and 1.3 is smaller than the difference between 1.3 and 1.4.

I'm no expert for this, but as far as I know, you can do lots of stuff even with version 1.1, but it's more complicated than for 2.0 and you often need more instructions  to achive a effect similar to a 2.0 shader.

The backwards compability needs quite a bit of work.


Valve didn't care about this. HL2 was sure to become a bestseller, so the effort to support older cards was justified by the plus of potential customers with older gfx cards.
Imo it's a logistical issue. Many other games only support 2.0 cards, or have only a DX7 fallback mode for all older cards. Only the really big games support multiple shader versions and/or multiple APIs. (HL1 had D3D, OGL, Glide and Software rendering...)
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
Quote
The maps I got from Vasudan Admiral didn't work out so well though, they seem inverted.  Whether that's just the maps or partially the code I don't know.
Well blargh. :\
I suppose it's quite possible they're inverted - I only had Truespace to test them with, and it's entirely possible it's the wrong way round (wouldn't be the first time either).

However, AFAIK they were Black->White = Recess->Bump?
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline wolf

  • 25
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
What kind of shader support is this exactly?
GLSL.

Quote
Is it going to be limited to pixel shader v2.0 and above?
Yes.

Quote
There are neat things you could do with v1.3 nevertheless
That's true, but it's writing in assembly and using hacks.

Also, Geforce FX doesn't suffer from performance problems in OpenGL, if the wiki entry is to be believed
Only if using half precision AFAIK. And it's not currently being done.

 

Offline neoterran

  • 210
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
so basically, you are restricting the people that can use this feature to those with radeon 9500 and up or Geforce 6 series and up, leaving Geforce FX, Radeon <9500, Geforce 4, and Geforce 3 users in the cold.

That's not very nice  :(
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 

Offline S-99

  • MC Hammer
  • 210
  • A one hit wonder, you still want to touch this.
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
What shader module will people need? radeon 9500 and up for ati and other cards from that generation generally sm2.0 of which is possible to do real hdr on hl2 with. After that all of the geforce 6 cards have sm3.0, and i assume that means that geforce 5 line had sm2.0. Only the radeon x1xxx series has sm3.0, everything from the radeon 9500 up has sm2.0. Sm2.0 is all that's needed for hdr...in hl2. Now dabrain has shown the light why many more people can play with hdr in hl2 and why people can't play with hdr in farcry(farcry only likes sm3.0 though you can do hdr on sm2.0).
My figuring would be for those without a card that can't do the new fs2 bloom it won't matter too much. It's like just enjoying halflife 2 or farcry without hdr(or at least the bloom affect). Those who can't do it will be able to enjoy the game for absolutely all it has except for the bloom. Not to mention the bloom affect until it's performance optimized from what i've read may be a performance issue for many, and as that a lot of people might not use it because they'd be running too slow with it. Who gives a **** if people get left on the cold on this one. A lot more people got left in the cold with old graphics cards and far cry, a lot less left in the cold with old graphics cards and hl2. Who cares? The geforce 3 by now is quite old(although the original xbox uses the gpu), and with such an old card don't expect it to do everything, the same goes for people who own a geforce 4(you can't even play fear at all with that card).
Every pilot's goal is to rise up in the ranks and go beyond their purpose to a place of command on a very big ship. Like the colossus; to baseball bat everyone.

SMBFD

I won't use google for you.

An0n sucks my Jesus ring.

 

Offline neoterran

  • 210
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
shader model 2.0 is not usable in full precision mode (aka Radeon compatible) on the Geforce 5 series because of the crap way nvidia designed the Geforce FX. It basically slows down to a crawl unless it's in partial precision
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 

Offline neoterran

  • 210
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
What shader module will people need? radeon 9500 and up for ati and other cards from that generation generally sm2.0 of which is possible to do real hdr on hl2 with. After that all of the geforce 6 cards have sm3.0, and i assume that means that geforce 5 line had sm2.0. Only the radeon x1xxx series has sm3.0, everything from the radeon 9500 up has sm2.0. Sm2.0 is all that's needed for hdr...in hl2. Now dabrain has shown the light why many more people can play with hdr in hl2 and why people can't play with hdr in farcry(farcry only likes sm3.0 though you can do hdr on sm2.0).
My figuring would be for those without a card that can't do the new fs2 bloom it won't matter too much. It's like just enjoying halflife 2 or farcry without hdr(or at least the bloom affect). Those who can't do it will be able to enjoy the game for absolutely all it has except for the bloom. Not to mention the bloom affect until it's performance optimized from what i've read may be a performance issue for many, and as that a lot of people might not use it because they'd be running too slow with it. Who gives a **** if people get left on the cold on this one. A lot more people got left in the cold with old graphics cards and far cry, a lot less left in the cold with old graphics cards and hl2. Who cares? The geforce 3 by now is quite old(although the original xbox uses the gpu), and with such an old card don't expect it to do everything, the same goes for people who own a geforce 4(you can't even play fear at all with that card).


There is a big difference between games like FEAR, (which runs like crap on almost every card) and HL2/HL2 Ep 1, which runs both smooth and looks as good, while still having a graceful degradation into shader 1.x mode.

Supporting Shaders 2.0 is fine, but at least offer a mode for Shader 1.x folks. All the best games do.

Also there is a big difference between that entire generation of games and Freespace Open, which is probably used by a wider group of cards than just the latest and greatest. Maybe we should do a poll to find out. All i'm saying is, doing a crappy bloom effect is perfectly possible in shader 1.x just go look at Half-Life 2 episode one as a great example, also, Oldblivion is a loader for Oblivion using Shader 1.x, and there are even software bloom shaders for oblivion that use 1.x code, I've seen it and it's high level, it looked to me like C. Certainly far from "assembly"
« Last Edit: July 26, 2006, 05:19:03 pm by neoterran »
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 

Offline S-99

  • MC Hammer
  • 210
  • A one hit wonder, you still want to touch this.
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
Well good for me that i have a geforce 7600gt coming in the mail. Yes the geforce fx series is ****, all the people i know that owns a geforce 5 card, has usually gotten it for free out of older computers, or for 10$ out of a box at a computer shop. Everyone else was i know that owns a geforce 5 was sucker falling for a 120$ deal for the 5700le(they just don't care about what the le stands for, or rather the low memory interface ddr either). Anyway what's so bad about restricting graphics cards anyway? Hl2 actually opens up to a wide variety of graphics cards about as much as fso has. Given that we at least don't have people here still trying to play on anything older than a high end geforce2, same goes for hl2. But, i think people should really be worrying if they're an ati user with a radeon 9250 with dx8.1 compliance like cobra has and can't even do the hdrish smartshaders. Besides, hardware blooms and glows are better, and it sounds like most of this stuff is going to be dependent on cards with dx9 compliance, maybe dx8.1 also. Maybe people should take the route valve has taken with hl2 and it's hdr, i mean there's a lot of people using hdr on ****ty cards that people didn't think possible, one of them was me with a radeon 9600se running full hdr in lost coast very slowly but surely.
Every pilot's goal is to rise up in the ranks and go beyond their purpose to a place of command on a very big ship. Like the colossus; to baseball bat everyone.

SMBFD

I won't use google for you.

An0n sucks my Jesus ring.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
It WILL support less than SM2.0.
It WILL work with more than GLSL.

The code just won't hit CVS otherwise.  Nothing else will be acceptable to me.

Regardless of what it does now (SM2.0+ and GLSL only) I'll add support for the rest.  And I'll continue adding support and making optimizations as needed just in case.  Does that mean it will all work for everyone?  No.  Someone still has to actually write the shaders for everything, but the code should be there to use it if possible.  Does that mean that every effect will be available for every card?  No.  It won't support everything for everyone, but there will be GLSL support, Cg support, and basic support for GeForce3+ series cards at least in code if not the initial shader files.  Different versions of the shader effects can be added at any point.

GLSL/SM2.0+ will be greatly preferred for every effect however.  And although Cg support will be there, its use will likely be frowned upon.

 

Offline neoterran

  • 210
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
Hmm, well it seems like you're saying one thing, and wolf is saying another.
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 

Offline neoterran

  • 210
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
Well good for me that i have a geforce 7600gt coming in the mail.

 :(
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
Hmm, well it seems like you're saying one thing, and wolf is saying another.
And that makes sense, wolf's code is SM2.0+ and GLSL.  But I'm adding the rest, plus a few extra things.  ;)

I'm still working on the extra stuff so I haven't copied wolf on it all yet.  What we've got is only a start, there needs to be a good bit more work done before it's truely usable.

 

Offline Kaine

  • 27
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
can you give us a link or two that you may be using for refrence so some of us can get a head-start on learning shader languages so when this hits CVS we can get to work straight away?

 

Offline Mehrpack

  • 28
  • Flying Monkey
Re: Finally - Bloom for nVidia-Users (Windows - OpenGL)
hi,
theres only two high launges: GLSL for OpenGL and HLSL for Direct3D.

and serverals tools, which can compile the high language to serverls shader versions.

like cg from nvidia, monkey or so from ati and theres a editor from MS, if my memories are correctly.


and to the shader version: if shaders are slower than some on older verison, that doesnt mean its the shaderversion itsself.
with shader 1.3 can you make more effects or speed as in 1.1, in 1.4 to 1.3 too, in 2.0 to 1.x too and so on.
the newer versions are mighty as the preview and alow a programmer more stuff easier to implate with more speed or more effects on the screen.

possible the reason if a shader slower as a lower version:

- the hardware isnt fast enough for the higher version
- the shader display doesnt the same thing, so the lower version doesnt need so much resources
- the shadercode is to complex for the currently hardware and will better run with the next, stronger generation.
- the code is **** or code doesnt optimizes correctly and waste a lot of resource

Mehrpack
Nobody is Perfect.
attention: this english is dangerours and terrible, runaway so fast you can!