[updated] An Ogre shader collection ?

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
User avatar
sphinkie
Greenskin
Posts: 114
Joined: Wed Jul 07, 2004 11:08 am
Location: Paris
Contact:

[updated] An Ogre shader collection ?

Post by sphinkie » Mon May 22, 2006 9:56 am

Hi

I started recently with Cg Shaders, and I like to submit the idea of creating a new chapter in wiki dedicated to a shader collection (maybe in the sniplet section).

Why this ?
There are already shader collections on nvidia and other sites, and also some in the "media/material/program" directory of the new release of Ogre...
Yes, but the shader from internet rarely works easily when integrated "as-is" into Ogre...
And this could be also used for tutorial purpose for thoses who like to start by tweaking existing shaders.

In this new collection, we will find for each shader:
- description (with screenshot)
- usage (including custom parameters)
- VP and FP code
- material file

your opinion ?
Last edited by sphinkie on Mon Jun 05, 2006 1:33 pm, edited 1 time in total.
0 x

pxL
Gremlin
Posts: 158
Joined: Fri Oct 07, 2005 11:48 am
Location: Hilversum, The Netherlands
Contact:

Post by pxL » Mon May 22, 2006 11:07 am

I think it would be a nice addition to the wiki and also be a handy step up when your new to shaders :D.

I know I would be interested in such a wiki page :wink:
0 x

User avatar
abstractcoder
Gnome
Posts: 336
Joined: Wed Oct 12, 2005 1:50 pm
Location: UK
Contact:

Post by abstractcoder » Mon May 22, 2006 11:50 am

i dont know if you have noticed it but there is this thread:

http://www.ogre3d.org/phpBB2/viewtopic. ... highlight=

i know its been around for a while now but i am going to be starting a new hosting this week and we have jacmoe willing to back it as well.

as i see it i think having a repository of models, textures, shaders and anything else that fits the label of a resource for using in an ogre application could be included here.

I think the software (I think joomla at the moment) this is going to be used on this new site would work better for things like this. We could then just have all the tutorials and documents on the wiki.

But in the end this is entirely up to you :), we will provide the areas for shaders (or at least I think we should) and then you can use them if you wish to.

[EDIT]

i would also find this helpful, for example, some really simlpe shaders that people can take a look at to see how it all works, i for one have not yet had chance to learn about shaders yet.
0 x

User avatar
sphinkie
Greenskin
Posts: 114
Joined: Wed Jul 07, 2004 11:08 am
Location: Paris
Contact:

Post by sphinkie » Mon May 22, 2006 12:56 pm

Hi Steve7946

Here is my simple (and single) shader at the moment. You can use it if you want.
http://www.ogre3d.org/phpBB2/viewtopic. ... highlight=


Concerning the Ogre Ressource Site, I have had a look at it. It seems interesting (but not very full at the moment) . Concerning shaders as they are pieces of code, maybe the wiki is better, because anyone can improve or correct it, and the best version is always online for future users.

On another hand, they work with materials...
0 x

Nuker
Gremlin
Posts: 195
Joined: Fri Mar 04, 2005 9:59 am
Location: Germany, BY
Contact:

Post by Nuker » Mon May 22, 2006 1:45 pm

Concerning the Ogre Ressource Site, I have had a look at it. It seems interesting (but not very full at the moment) . Concerning shaders as they are pieces of code, maybe the wiki is better, because anyone can improve or correct it, and the best version is always online for future users.
Full ACK!
0 x
http://www.consulting-reif.de

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe trying
to produce bigger and better idiots. So far, the Universe is
winning."

User avatar
abstractcoder
Gnome
Posts: 336
Joined: Wed Oct 12, 2005 1:50 pm
Location: UK
Contact:

Post by abstractcoder » Mon May 22, 2006 2:50 pm

sphinkie,

thanks for that. i think you may be right there, i had not thought about it like that. as for the materials if they are hosted on the resource site then we could just add links in the shader section of the wiki to which materials are needed.

we will have to see what works best.
0 x

ColinDoody
Kobold
Posts: 34
Joined: Tue Jan 03, 2006 10:45 pm
Location: Tokyo, Japan
Contact:

Post by ColinDoody » Tue May 23, 2006 1:40 am

I think its an excellent idea . As mentioned, however, please make sure that all the resources are centralized . So if you are making a website that is hosting these materials , please make it tightly linked with the wiki .

The last thing anyone needs are shard sites popping up, each hosting a few shaders or resources and no one being complete.
0 x
Image

Vectrex
Ogre Magi
Posts: 1266
Joined: Tue Aug 12, 2003 1:53 am
Location: Melbourne, Australia
Contact:

Post by Vectrex » Tue May 23, 2006 9:27 am

3rded 4thed and infinitied
0 x

User avatar
Jerky
Orc Shaman
Posts: 791
Joined: Wed Mar 02, 2005 4:13 am
Location: Springville, Utah
Contact:

Post by Jerky » Tue May 23, 2006 9:47 am

Chalk another one up :).
0 x
Erik Briggs (Jerky)
My Blog
Project Wish
Image

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Tue May 23, 2006 6:50 pm

I think this repository project can become a valuable asset to the community. :)

We just have to find a nice and easy way to do it.
Maybe a combination of Gallery - Remository - Forum - Wiki ?

I am not sure about the Wiki, though.

Sometimes all you need is a pluggable shader script, complete with material script and textures.
I think I still have some really groovie particle scripts somewhere, kindly donated by a fellow forum member.
I will definately put up the fader shader script! :)

If people feel like it, they can write a wiki page about their model, script, whatever, as a usage guide / tutorial. ?

If we keep pimping this, we will eventually gather a sizeable amount of quality content. Of that I'm sure. :wink:
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
sphinkie
Greenskin
Posts: 114
Joined: Wed Jul 07, 2004 11:08 am
Location: Paris
Contact:

Post by sphinkie » Tue May 23, 2006 7:41 pm

OK.

I have started the "shaders" section in the wiki :
http://www.ogre3d.org/wiki/index.php/Co ... ts#Shaders

and start adding the first ones...

As says Jacmoe: we can start with that, and see later if we move them the resource site.
For instance, when a shader is well finished, clean, packaged, ready-for-use, documented, we can make a zip of it, and put it in the repository.


note: I have not found remository in my dictionary. Is that a contraction for remote-repository ?
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Tue May 23, 2006 9:22 pm

Remository is a Mambo/Joomla component for file repositories from Black Sheep Research - you've used it a lot, I think: the OGRE Remository, where you can download OGRE, dependencies and tools. :wink:

Looking forward to see some content! :)
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Tue May 23, 2006 10:15 pm

Great Wiki pages by the way, sphinkie! :)
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
abstractcoder
Gnome
Posts: 336
Joined: Wed Oct 12, 2005 1:50 pm
Location: UK
Contact:

Post by abstractcoder » Tue May 23, 2006 11:27 pm

this looks really good. i will have to start learning how to use them.

[EDIT]

i didnt think it was enough for a new post i just though i would say i have had my name changed on here from steve7946 to abstractcoder as steve7946 is a poor username. and i am starting to use my website of the same name again now.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Tue May 23, 2006 11:39 pm

I'll change your username on the Conglomerate Forum, abstractcoder! :)

Send you a PM when I do.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

ColinDoody
Kobold
Posts: 34
Joined: Tue Jan 03, 2006 10:45 pm
Location: Tokyo, Japan
Contact:

Post by ColinDoody » Wed May 24, 2006 2:51 am

Great guys- keep it up.

I think it would also be really valuable if each shader had pictures with it ... no matter what the simplicity

But keep up the contributions :)
0 x
Image

User avatar
sphinkie
Greenskin
Posts: 114
Joined: Wed Jul 07, 2004 11:08 am
Location: Paris
Contact:

Post by sphinkie » Mon Jun 05, 2006 1:33 pm

New shader added: a hologram effect.
http://www.ogre3d.org/wiki/index.php/Holographe_Shader

Green color, with some transparency effect, and some noisy bands...

(if you are a talented artist: you can improve the graphic elements)
0 x

User avatar
Chris Jones
Lich
Posts: 1742
Joined: Tue Apr 05, 2005 1:11 pm
Location: Gosport, South England

Post by Chris Jones » Mon Jun 05, 2006 3:01 pm

cool, can you include screenshots with the different shaders?
0 x

User avatar
guilderstein
Halfling
Posts: 66
Joined: Wed Jan 04, 2006 11:48 am
Location: Hungary, Budapest

Post by guilderstein » Fri Jun 09, 2006 4:36 pm

Hello!

I got working some perpixel and offset mapping shaders with Ogre in cg.
Check WIKI.
Screens there.

(What's that all about: ogredemos did not have real perpixel, just normal/offset mappin' and pervertex lighting, plus original offset mappin' was only for 1 light)
0 x

User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
Contact:

Post by Falagard » Fri Jun 09, 2006 5:49 pm

Nice work. I'll be putting up my shaders soon as well.
0 x

User avatar
guilderstein
Halfling
Posts: 66
Joined: Wed Jan 04, 2006 11:48 am
Location: Hungary, Budapest

Post by guilderstein » Fri Jun 09, 2006 6:23 pm

Never dun WIKI before, got probs, but cg is on now, I'm still writing materials there, adding pics.

Section: CodeSnippits/Shaderss/Perpixel of WIKI.

Have fun :)
0 x

User avatar
Wretched_Wyx
Orc
Posts: 498
Joined: Thu Mar 16, 2006 5:27 pm
Contact:

Post by Wretched_Wyx » Fri Jun 09, 2006 11:54 pm

Hey guilderstein,

those shaders aren't quite so "out-of-the-box" after all...

Code: Select all

-----------------------------------
Details:
-----------------------------------
Error #: 9
Function: CgProgram::loadFromSource
Description: Unable to compile Cg program OneTexture: CG ERROR : The compile returned an error.
(83) : error C0000: syntax error, unexpected '(' at token "("
(83) : error C0501: type name expected at token "("
(85) : error C0000: syntax error, unexpected identifier, expecting ';' or ',' at token "normal"
(85) : error C0501: type name expected at token "normal"
(88) : error C0000: syntax error, unexpected reserved word "uniform", expecting identifier or type identifier at token "uniform"
(88) : error C0501: type name expected at token "uniform"
(97) : error C0000: syntax error, unexpected reserved word "out", expecting identifier or type identifier at token "out"
(97) : error C0501: type name expected at token "out"
(99) : error C0000: syntax error, unexpected reserved word "out", expecting identifier or type identifier at token "out"
(99) : error C0501: type name expected at token "out"
(103) : error C0000: syntax error, unexpected reserved word "out", expecting identifier or type identifier at token "out"
(103) : error C0501: type name expected at token "out"
(104) : error C0000: syntax error, unexpected reserved word "out", expecting identifier or type identifier at token "out"
(104) : error C0501: type name expected at token "out"
(105) : error C0000: syntax error, unexpected ')', expecting ';' or ',' at token ")"
(105) : error C0501: type name expected at token ")"
(107) : error C1054: initialization of non-variable "oClipPos"
(109) : error C0000: syntax error, unexpected '=' at token "="
(109) : error C0501: type name expected at token "="
(113) : error C0000: syntax error, unexpected '=' at token "="
(113) : error C0501: type name expected at token "="
(117) : error C0000: syntax error, unexpected '=' at token "="
(117) : error C0501: type name expected at token "="
(121) : error C0000: syntax error, unexpected ':' at token ":"
(121) : error C0501: type name expected at token ":"
(122) : error C0000: syntax error, unexpected ':' at token ":"
(122) : error C0501: type name expected at token ":"
(126) : error C0000: syntax error, unexpected ':' at token ":"
(126) : error C0501: type name expected at token ":"
(128) : error C0000: syntax error, unexpected ',' at token ","
(128) : error C0501: type name expected at token ","
(134) : error C0000: syntax error, unexpected ',' at token ","
(134) : error C0501: type name expected at token ","
(142) : error C0000: syntax error, unexpected ',' at token ","
(142) : error C0501: type name expected at token ","
(149) : error C0000: syntax error, unexpected '=' at token "="
(149) : error C0501: type name expected at token "="
(149) : error C0000: syntax error, unexpected ')' at token ")"
(149) : error C0501: type name expected at token ")"
(151) : error C0000: syntax error, unexpected '=' at token "="
(151) : error C0501: type name expected at token "="
(151) : error C0000: syntax error, unexpected '-' at token "-"
(151) : error C0501: type name expected at token "-"
(153) : error C0000: syntax error, unexpected '=' at token "="
(153) : error C0501: type name expected at token "="
(153) : error C0000: syntax error, unexpected '.' at token "."
(153) : error C0501: type name expected at token "."
(157) : error C0000: syntax error, unexpected '=' at token "="
(157) : error C0501: type name expected at token "="
(157) : error C0000: syntax error, unexpected ',' at token ","
(157) : error C0501: type name expected at token ","
(177) : error C1110: function "Simple_PerPixel_Frag" has no return statement
(179) : error C0000: syntax error, unexpected ':' at token ":"
(179) : error C0501: type name expected at token ":"
(180) : error C0000: syntax error, unexpected ':' at token ":"
(180) : error C0501: type name expected at token ":"
(182) : error C0000: syntax error, unexpected ',' at token ","
(182) : error C0501: type name expected at token ","
(184) : error C0000: syntax error, unexpected ',' at token ","
(184) : error C0501: type name expected at token ","
(187) : error C0000: syntax error, unexpected ':' at token ":"
(187) : error C0501: type name expected at token ":"
(188) : error C0000: syntax error, unexpected ':' at token ":"
(188) : error C0501: type name expected at token ":"
(189) : error C0000: syntax error, unexpected ':' at token ":"
(189) : error C0501: type name expected at token ":"
(194) : error C0000: syntax error, unexpected '=' at token "="
(194) : error C0501: type name expected at token "="
(194) : error C0000: syntax error, unexpected '-' at token "-"
(194) : error C0501: type name expected at token "-"
(206) : error C0000: syntax error, unexpected ':' at token ":"
(206) : error C0501: type name expected at token ":"
(207) : error C0000: syntax error, unexpected ':' at token ":"
(207) : error C0501: type name expected at token ":"
(208) : error C0000: syntax error, unexpected ':' at token ":"
(208) : error C0501: type name expected at token ":"
(210) : error C0000: syntax error, unexpected ',' at token ","
(210) : error C0501: type name expected at token ","
(214) : error C0000: syntax error, unexpected ':' at token ":"
(214) : error C0501: type name expected at token ":"
(217) : error C0000: syntax error, unexpected '=' at token "="
(217) : error C0501: type name expected at token "="
(217) : error C0000: syntax error, unexpected ')' at token ")"
(217) : error C0501: type name expected at token ")"
(222) : error C0000: syntax error, unexpected '=' at token "="
(222) : error C0501: type name expected at token "="
(222) : error C0000: syntax error, unexpected ',' at token ","
(222) : error C0501: type name expected at token ","
(231) : error C0000: syntax error, unexpected ':' at token ":"
(231) : error C0501: type name expected at token ":"
(232) : error C0000: syntax error, unexpected ':' at token ":"
(232) : error C0501: type name expected at token ":"
(234) : error C0000: syntax error, unexpected ',' at token ","
(234) : error C0501: type name expected at token ","
(236) : error C0000: syntax error, unexpected ',' at token ","
(236) : error C0501: type name expected at token ","
(238) : error C0000: syntax error, unexpected ',' at token ","
(238) : error C0501: type name expected at token ","
(241) : error C0000: syntax error, unexpected ':' at token ":"
(241) : error C0501: type name expected at token ":"
(242) : error C0000: syntax error, unexpected ':' at token ":"
(242) : error C0501: type name expected at token ":"
(243) : error C0000: syntax error, unexpected ':' at token ":"
(243) : error C0501: type name expected at token ":"
(244) : error C0000: syntax error, unexpected ':' at token ":"
(244) : error C0501: type name expected at token ":"
(245) : error C0000: syntax error, unexpected ':' at token ":"
(245) : error C0501: type name expected at token ":"
(246) : error C0000: syntax error, unexpected ':' at token ":"
(246) : error C0501: type name expected at token ":"
(247) : error C0000: syntax error, unexpected ':' at token ":"
(247) : error C0501: type name expected at token ":"
(256) : error C0000: syntax error, unexpected '=' at token "="
(256) : error C0501: type name expected at token "="
(256) : error C0000: syntax error, unexpected '-' at token "-"
(256) : error C0501: type name expected at token "-"
(268) : error C0000: syntax error, unexpected ':' at token ":"
(268) : error C0501: type name expected at token ":"
(269) : error C0000: syntax error, unexpected ':' at token ":"
(269) : error C0501: type name expected at token ":"
(270) : error C0000: syntax error, unexpected ':' at token ":"
(270) : error C0501: type name expected at token ":"
(271) : error C0000: syntax error, unexpected ':' at token ":"
(271) : error C0501: type name expected at token ":"
(272) : error C0000: syntax error, unexpected ':' at token ":"
(272) : error C0501: type name expected at token ":"
(273) : error C0000: syntax error, unexpected ':' at token ":"
(273) : error C0501: type name expected at token ":"
(274) : error C0000: syntax error, unexpected ':' at token ":"
(274) : error C0501: type name expected at token ":"
(276) : error C0000: syntax error, unexpected ',' at token ","
(276) : error C0501: type name expected at token ","
(278) : error C0000: syntax error, unexpected ',' at token ","
(278) : error C0501: type name expected at token ","
(281) : error C0000: syntax error, unexpected ',' at token ","
(281) : error C0501: type name expected at token ","
(288) : error C0000: syntax error, unexpected ',' at token ","
(288) : error C0501: type name expected at token ","
(293) : error C0000: syntax error, unexpected '=' at token "="
(293) : error C0501: type name expected at token "="
(293) : error C0000: syntax error, unexpected ')' at token ")"
(293) : error C0501: type name expected at token ")"
(298) : error C0000: syntax error, unexpected '=' at token "="
(298) : error C0501: type name expected at token "="
(298) : error C0000: syntax error, unexpected ',' at token ","
(298) : error C0501: type name expected at token ","
0 x

big_o
Goblin
Posts: 279
Joined: Sun Feb 19, 2006 1:08 am

Post by big_o » Sat Jun 10, 2006 2:35 am

I'm new to shaders and Ogre in general, but I am very interested in shaders, and this is a very good start. I'm curious as to what I would need to do to get the per-pixel lighting shader to work with textures, and to change the lighting properties.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Sat Jun 10, 2006 9:58 am

I second that! Good initiative Sphinkie! And great to see that other are contributing as well! :)
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

big_o
Goblin
Posts: 279
Joined: Sun Feb 19, 2006 1:08 am

Post by big_o » Sun Jun 11, 2006 4:43 am

I was able to get textures working with the standard per-pixel shader by adding an extra pass like with the offset-specular shader, but any time the object moves(not rotates), I get these weird flickering artifacts.
0 x

Post Reply