Horde3D

Next-Generation Graphics Engine
It is currently 29.03.2024, 06:27

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Ambient Lighting
PostPosted: 14.05.2007, 15:53 
Offline

Joined: 05.03.2007, 19:38
Posts: 167
Location: Romania
I`m heaving real trouble converting the spotlight provided in the chicago demo app into an ambient light. light.material.xml and lighting.shader.xml gave no answer. same story with the api. am i missing something? i am clueless onto what happens in deferredutils_frag.txt and lightingutils_frag.txt but i am sure the latter pixel shader holds the answer.

the removal of realtime computed shadows holds great promise to me, as it will cause a great performance boost. (same story on any rendering engine :| )

can you help me with this?

paul


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 14.05.2007, 22:30 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
I really need to write a comprehensive usage guide which shows how to solve some standard issues. Most things are possible with Horde but they are not always directly obvious for beginners. Currently I'm still busy with adding features so I hardly have the time for that :(

Anyways, back to the subject. There are several ways to do ambient lighting. The Chicago pipeline.xml defines an ambient pass which uses the shader context "AMBIENT". Currently these contexts just set the color to black. You could use a brighter value or the texture modulated with some factor and get your ambient lighting. Another way would be to define a lightsource which affects the whole scene and to apply a special shader to it. But I think the first way is easier to do.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 15.05.2007, 12:07 
Offline

Joined: 05.03.2007, 19:38
Posts: 167
Location: Romania
at the moment with my level of knowledge the modifying the shader context seems to be the easiest way, but how to change the parameters in other to achieve ambient lighting?

paul


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 16.05.2007, 12:14 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
You could just copy the LIGHTING context from the skybox shader and rename it to AMBIENT. I think that should work. Then you can multiply a factor smaller than one with the albedo (texture) color to reduce the intensity of the ambient lighting.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 16.05.2007, 12:47 
Offline

Joined: 05.03.2007, 19:38
Posts: 167
Location: Romania
thanks for pointing me to the skybox shader. i`ve actually used this one in the stones material. now i`ve got my ambient lighting ;)

i am now getting up to 70 fps with the folowing setings

TrilinearFiltering 1
TexCompression 1
AnisotropyFactor 4
Resolution 960*600

and got 90+ with all on low. The important thing is that i can boost the geometry now

Image


i have all i needed to get me on my way, now i`m going to start a wip devblog in showcase regarding the evolution of my first Horde3D app

paul


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 54 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group