TGMs Shader Package[C++/GLSL]

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.

Postby jingquan » Thu Nov 08, 2007 11:34 am

You'll need OpenGL 2.0 or higher I think. I got that running in OpenGL 1.5 as well.
jingquan
 
Posts: 222
Joined: Sun Aug 20, 2006 4:10 am

Postby BlindSide » Thu Nov 08, 2007 12:38 pm

No, even OpenGL 1.2 is fine. It is probably a strict shader compiler that is throwing some errors, a too low pixel shader or vertex shader version, or an incorrect (too large or npot) RTT.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
BlindSide
Admin
 
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Postby hybrid » Thu Nov 08, 2007 2:16 pm

Well, OpenGL 1.5 is the first one with GLSL included. Otherwise you have to rely on extensions.
hybrid
Admin
 
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany

Postby dlangdev » Thu Nov 29, 2007 12:43 am

Awesome, hope to see more of this stuff soon.
User avatar
dlangdev
 
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR

Postby fireside » Sun Dec 02, 2007 3:58 pm

How hard is it to do a shader that can bump map along with the light maps? I heard you have to use shaders or else you can only use one or the other in Irrlicht.
fireside
 
Posts: 158
Joined: Thu Dec 01, 2005 10:55 pm

Postby TheGameMaker » Thu Dec 06, 2007 11:46 am

its not hard... its in fakt just 3 or 4 lines more...
you simply have to multiply the result with the lightmapped texture.. in fakt this has been done by me in my "bounce" projekt in the lava level..
(I use a strange aproach to lightmapping..)
It uses the range from 0 to .5 for darkening and from .5 to 1 for lightin up..
so maybe thats not what you want.. but anyway.. its very easy..
simply load another texture.. (the lightmap..) and then get the pixel and multiply it with the return value...
TheGameMaker
 
Posts: 275
Joined: Fri May 12, 2006 6:37 pm
Location: Germany

Postby belfegor » Sun Dec 09, 2007 9:15 am

I doubt that you can do that since none of the irrlicht vertex types
can hold diffusetexcoord/tangents/binormal and lightmap texcoord together.
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
User avatar
belfegor
 
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Postby BlindSide » Sun Dec 09, 2007 1:33 pm

I made one the other day, it used TGM's on-the-fly tangent generation method like in his normal map shader, so that the second texcoord can be fre for lightmaps.

Although, this doesn't seem to work well on all meshes for some reason.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
BlindSide
Admin
 
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Postby TheGameMaker » Mon Dec 10, 2007 6:35 pm

since my one was based on a single small mesh I simply used the same coordinates for tex&lightmap, but yeah.. Blindsite is right.. I use on the fly generated Bitangents since my shader is working with animated meshes as well.
TheGameMaker
 
Posts: 275
Joined: Fri May 12, 2006 6:37 pm
Location: Germany

Postby Avian » Tue Dec 18, 2007 8:20 pm

Those are mad effects!
Thanks!
Avian
 
Posts: 17
Joined: Sun Dec 16, 2007 7:14 am

Postby dlangdev » Tue Dec 18, 2007 8:24 pm

come on, put some URLs where i can look into.

images are much better than words.

;-)
Image
User avatar
dlangdev
 
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR

Postby FuzzYspo0N » Tue Dec 18, 2007 8:49 pm

lol, dlangdev, read all 4 pages first :D
User avatar
FuzzYspo0N
 
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa

Postby dlangdev » Tue Dec 18, 2007 10:50 pm

it would be nice to see what kind of framework will come out later for supporting material-effect binding, i mean someone will have to think about a way of mapping a technique to a material, then store that relationship somewhere, maybe a textfile or something.

i think most demos right now are doing the mapping in hard code. though what is needed to move this forward will take a lot of discussion, or perhaps the core will come up with a tentative design.

just think about the possibilities, it's simply...

...awesome.

come on now, fellas. bang up some code and show us more glitz.

;-)
Image
User avatar
dlangdev
 
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR

Postby BlindSide » Wed Dec 19, 2007 8:35 am

Niko is planning an XML-based format. Though I doubt any major progress has been or will be made on that any time soon.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
BlindSide
Admin
 
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Postby dlangdev » Wed Dec 19, 2007 6:12 pm

cool, that's nice to know there is a plan.

i might have sounded too demanding, so i may have to clarify that.

anyway, for now, i'll code my demo scene the shortest possible way as i'm not ready to make a cg-based game. there's a lot of stuff to learn in terms of vertex and fragment shading. so i'm doing them one piece at a time putting them in demo programs. later, once i get to learn how they connect then i'll be able to piece them together.

i'm hoping shader quality is going to look closely like crysis or unreal3, though.
Image
User avatar
dlangdev
 
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR

PreviousNext

Return to Code Snippets

Who is online

Users browsing this forum: No registered users and 1 guest