Chernobyl Viewer v0.99 Beta - Linux port!

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Hi, Nadro.

A little question about shaders.

If I have a scene with almost 200+ lights, I know that shaders can't use them all. Is there a automatic mecanism that would take the nearest lights to the capacity of the shader (2/4/8 lights) or this need to be coded? (My principal concerns are about Normal/Specular mapping)

If this need to be coded, will it need to be in C++ or done inside the shader itself (.cg, .hlsl, or .glsl)

I really don't understant this about the shader process.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

With deferred shading you can have 200 lights.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

Lighting limitation was a big problem with the last gen cards and techniques. With the current techniques and shader functions, well thought-out lighted environments basically have no more lights limitation, which is great. I think some of those systems already made or are making their ways to Irrlicht and if the demand is good, more will soon I guess. I've got to admit, a deferred lighting that would give good lighting with lots of lights AND good shadows would really hit the spot right about now ;) :P
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

HI, Thanks about the info about "deferred shading", but not sure this will be possible. First, I don't know anything about this and we don't any shading programmer in our team.

We'll need to use something that could be created from IRRcg. Fullmetalcoder is doing great on the engine but warned me that he don't think he'll do shaders for the engine.

Using a CG script for normal/specular shading, how is that accounting for the nearest lights. Or we have to input the light manually in the shaders?

For shadowing, would you recommend a shader based shadowing (again how it will account for that? (moving object going thru the level)).

Stencil shadows are still buggy or there is something that can prevent the false shadows? (Sorry, that question is out of the thread subject)
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

Irrcg ARE shaders >.<
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

Hi christianclavet,

I think than for modern games deferred shading is the best solution. Between creating shaders for Deferred Shading and Forward Rendering is only one difference. For DS You have to write G-Buffer. In first standard pass You write to RT textures (high precision or You have to use packing) infos as: position, normals, color etc. In next pass You get position, normals etc. values from created RT textures (in Forward rendering You get this value from re-rendering vertex in each pass). You can use G-Buffer write method from my Deferred Shading demo (with source code) on Irrlicht forum, this demo use IrrCg and only Cg shaders.

If You prefer Forward Rendering method You have to create function for finding nearest light in Your c++ mainly code and send this lights values to shader (In Irrlicht source You can find similar function for finding 8 nearest lights).
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
grayman
Posts: 69
Joined: Thu May 12, 2005 10:48 am
Location: colombia

Post by grayman »

Nadro Pro!!!, im really interesed about irrCg binding but i really dont know what it really do, where could i see a tutorial?, and if i want to load the crate from the example in a normal irrlicht source and with all that maps, how could i do that?

I download your editor and it opens well on my ubuntu x64 using Wine 1.1.2 and seems work fine.

great work thanks!
System

AMD X2 4200
nvidia 7600gs 256mb
2GB ram DDR2
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

grayman wrote:Nadro Pro!!!, im really interesed about irrCg binding but i really dont know what it really do, where could i see a tutorial?, and if i want to load the crate from the example in a normal irrlicht source and with all that maps, how could i do that?

I download your editor and it opens well on my ubuntu x64 using Wine 1.1.2 and seems work fine.

great work thanks!
Hi grayman,
You can see how to work IrrCg in examples from IrrCg. In next release I plan add normal tutorial for it. You can use Cg shader via IrrCg very similar to use HLSL, GLSL via native Irrlicht core.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Post Reply