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.
jingquan
Posts: 222
Joined: Sun Aug 20, 2006 4:10 am
Contact:

Post by jingquan »

You'll need OpenGL 2.0 or higher I think. I got that running in OpenGL 1.5 as well.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

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
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, OpenGL 1.5 is the first one with GLSL included. Otherwise you have to rely on extensions.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Awesome, hope to see more of this stuff soon.
fireside
Posts: 158
Joined: Thu Dec 01, 2005 10:55 pm

Post by fireside »

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.
TheGameMaker
Posts: 275
Joined: Fri May 12, 2006 6:37 pm
Location: Germany

Post by TheGameMaker »

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...
belfegor
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Post by belfegor »

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.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

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
TheGameMaker
Posts: 275
Joined: Fri May 12, 2006 6:37 pm
Location: Germany

Post by TheGameMaker »

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.
Avian
Posts: 17
Joined: Sun Dec 16, 2007 7:14 am

Post by Avian »

Those are mad effects!
Thanks!
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

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

images are much better than words.

;-)
Image
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

lol, dlangdev, read all 4 pages first :D
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

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
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

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
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

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
Post Reply