Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
0 registered members (), 631 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 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 | chip programmers | 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