Gamestudio Links
Zorro Links
Newest Posts
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
ZorroGPT
by TipmyPip. 04/08/26 17:08
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Grant), 4,235 guests, and 19 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Geir, ondrej, mredit, vestriaa, Lukudo
19206 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