Some shaders links

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Some shaders links

Post by tuan kuranes »

As I didn't see a repository of what can be achieve with shaders
I was thinking that I could share some good source code links about shaders, apart from nvidia cg browser or ati sdk :

http://frustum.org/3d/
http://esprit.campus.luth.se/~humus/3D/

Not to mention the "far cry" demo with some impressive shaders in it...
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

Quality links, thanks.
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

It's Delphi site,
but easy to read as it is opengl calls and often cg...

- Interesting shaders :

depth of field, convolve, non-photo-realistic, cartoon, deferred, shadows, animation interpolation, billboards alignments, self-shadowing bumpmaps, depth peeling, dual paraboloid shadow mapping, image postprocess...

- Some non-shaders demo also interesting as :

hardware occlusion queries for very huge model rendering

Nice papers :

- deferred shading, terrain texturing, impostors...
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

Nvidia just put another shader editor with some sample shaders

Very nice fire, water and refraction.

http://developer.nvidia.com/object/fx_c ... ome.html#2
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Yeah the frustum demos are sooooo *wow*
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

just seen that i've forgotten to post the delphi3d site URL :

http://www.delphi3d.net/index.php
Guest

Post by Guest »

tuan kuranes wrote:Nvidia just put another shader editor with some sample shaders

Very nice fire, water and refraction.

http://developer.nvidia.com/object/fx_c ... ome.html#2
I'm new to the combination of Ogre and Shaders, so I'd like to ask if its possible to compose shade codes in nVidia's FX Composer and use the compiled cg file in ogre?
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

FX composer outputs .fx files, not Cg, and .fx is Direct3D specific, so you can't use them directly. However you can use the HLSL shader code, or convert it to Cg (which is trivial since the HLSL syntax is the same as Cg), and converting the other aspects of .fx like texture bindings, pass settings etc into Ogre .material scripts is pretty easy. I personally played with ATI's RenderMonkey to prototype the Fresnel demo's effects, and the tools have a lot in common (FX Composer was no doubt a response to RenderMonkey).
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

Here is an interesting projects with some shaders demo :

Sh is a metaprogramming language for programmable GPUs :
http://libsh.sourceforge.net/shaders/

-Diffuse, Gooch with Silhouette Detection, Environment-mapping, phong, worley (procedural textures generation), perlin noise
- the most original i've ever seen : " Particle System" using GPU as in order to compute gravity and collision (16 000 particles)

-Active project (last release on 16 march)
-The good thing is that you write c++ to generate shaders.
-There is a GPU emulator that can only be used for debugging but is worked to become faster (and be used as a fallback solution)
-zlib/libpng license
- Authors seems to be real expert of graphics... some papers :
http://www.cgl.uwaterloo.ca/Projects/rendering/Papers/
("hybrid of the shadow map and shadow volume" technique is the only one I seem to be able to understand... for now ;)
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

Huge list of shaders with source code under zlib license :

http://www.cgshaders.org/shaders/

Procedural & Animated Clouds ,fire , collisions, volume shadows, Soft Shadows from a local non-point light source, Particle System, Tone Shader,Windy Grass, explosions shockwave, sunset, cloud volumes, shadow mapping, sound triggered shaders......
( most binaries needs a nvidia card... but as cg sources provided... little tweaking can lead to binaries under other manufacturers card, here are some intersting conversion performance hints
http://www.beyond3d.com/forum/viewtopic ... =20&t=4386 )

Huge paper repository on advanced uses of GPU :
http://www.gpgpu.org/
collision, particles, fluid simulation...

I found all those links while reading one nvidia's GDC presentation :
http://developer.nvidia.com/docs/IO/823 ... OnGPUs.pdf
(all other GDC are woth the reading :
nvidia's : http://developer.nvidia.com/object/gdc_ ... tions.html
my favourites from ion storm
http://www.ionstorm.com/archives/oldIon ... efault.asp with some definition here
http://gamestudies.cdis.org/~rocketship ... mterms.htm
)
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

Errata : ion storm gdc presentation of 2004 GDC is here : http://www.ionstorm.com/gdc2004/
(more interesting than 2003..)
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

Here are ATI gdc 2004 papers :

http://www.ati.com/developer/techpapers.html

my favorite are :

http://www.ati.com/developer/gdc/D3DTut ... hading.pdf
(1920 shaders in the valve source engine !!

and the traditionnal "optimization tips"
http://www.ati.com/developer/gdc/D3D_Tu ... ations.pdf
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

Some very intersting source in this competition :

http://shadertech.com/contest/
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

the halftone entry is a Ogre app !
User avatar
PeterNewman
Greenskin
Posts: 128
Joined: Mon Jun 21, 2004 2:34 am
Location: Victoria, Australia
Contact:

Post by PeterNewman »

/me makes a tuan kuranes supplied reference link folder. Puts in the AI references, and now the shader references.

Thanks!
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

Very interesting clouds rendering techniques using normal map for lighting and a "transmissivity map" for the cloud opacity :

http://www.opengl.org/discussion_boards ... 3;t=012674
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

No shaders but incredibly interesting code snippets along with explanation :

http://www.stereopsis.com/

float radix sort 5 times faster than Opcode's, many floating point optimizations guides and strategies (some in asm, some in C, some well-know, some I've never heard of), many math tricks, all portables and well explained.

Even if optimization is not of a need, it unveils many underlying things, a must-read for 2d, 3d coders.
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Also very cool, especially the program using double-mapped vertex and pixel buffers to simulate a million particle system

http://download.nvidia.com/developer/SD ... mples.html

BTW the float radix sort looks nice for depth sorting et al!
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

Post Reply