Gamestudio Links
Zorro Links
Newest Posts
FXCM => AVA Trade Plugin???
by Martin_HH. 11/17/26 17:02
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
What are you working on?
by rayp. 11/02/26 13:57
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (Grant, AndrewAMD, 1 invisible), 34,218 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rht, MaliceTheMaker, Haitao_Ren, JimSimons, julienp
19249 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