Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,388 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Simple Lighting Question #282757
08/03/09 15:11
08/03/09 15:11
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline OP
Serious User
Claus_N  Offline OP
Serious User

Joined: May 2004
Posts: 1,510
Denmark
Hi,

I know that there's a 'DoLight' function in default.fx, and it works fine while using only one light (I'm using "DoLight(inPos,inNormal,0);"),
however I don't know how to use it when I want all 8 lights to affect my shader - can anyone show me a simple shader example of how to do that? smile

Re: Simple Lighting Question [Re: Claus_N] #282759
08/03/09 15:30
08/03/09 15:30
Joined: Aug 2009
Posts: 3
H
hussein14 Offline
Guest
hussein14  Offline
Guest
H

Joined: Aug 2009
Posts: 3
What can i do for shadow of light source (for example lump or Belvedere) Considering that lights are Spherical?
what about Cone light?

Re: Simple Lighting Question [Re: hussein14] #282764
08/03/09 15:45
08/03/09 15:45
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline
User
BoH_Havoc  Offline
User

Joined: Jun 2004
Posts: 655
to your left
Just add this to your shader and you have support for 8 lights

Code:
OutColor = 0;
for (int i=0; i<8; i++)  // Add 8 dynamic lights
	OutColor += DoLight(PosWorld,OutWorldNormal.xyz,i);




Shade-C EVO Lite-C Shader Framework
Re: Simple Lighting Question [Re: BoH_Havoc] #282766
08/03/09 15:53
08/03/09 15:53
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline OP
Serious User
Claus_N  Offline OP
Serious User

Joined: May 2004
Posts: 1,510
Denmark
Ahh okay, thanks smile


Moderated by  Blink, Hummel, Superku 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1