Radioactive-Software Radioactive-Software
Forum to discuss Radioactive-Software Products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dynamic Lighting

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Radioactive-Software Forum Index -> Programming
View previous topic :: View next topic  
Author Message
toeajama1
Newbie


Joined: 16 Nov 2009
Posts: 1

PostPosted: Mon Nov 16, 2009 9:35 am    Post subject: Dynamic Lighting Reply with quote

http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=323649&cmonth=10&cyear=2006&cday=10

Dan I was wondering how you implement this with a shader

I know its an older but a goodie.

Yuo don't have a simple example of this I could modify and play with do you?
or even something newer?
Back to top
View user's profile Send private message
dgreen
The One


Joined: 24 Sep 2005
Posts: 6811
Location: Raleigh, NC

PostPosted: Mon Nov 16, 2009 5:49 pm    Post subject: Re: Dynamic Lighting Reply with quote

toeajama1 wrote:
http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=323649&cmonth=10&cyear=2006&cday=10

Dan I was wondering how you implement this with a shader

I know its an older but a goodie.

Yuo don't have a simple example of this I could modify and play with do you?
or even something newer?


Hey, I actually still use the same system for some dynamic lights in my game, it's faked in two dimensions by 'projecting' a light texture down on the scene. The code to create most parts is pasted there [ I forgot I made that post spilling the beans lol ] ... it's very simple if you use HLSL, the old ASM code is a bit hard to follow I'd imagine. I can't beleive I used to code an entire graphics engine in ASM shaders Surprised

Is there any particular aspect you have a question about? The texture can be generated by RenderToTexture then you add a few lines to your scene's output shader. I can help you understand it if you can point to where you get confused in the original description ... it's very limited anyways, and it only really good for flat surfaces like terrain, or a city's streets. Also I just looked at the HLSL code it's quite a hacked up mess this whole algorithm is, it's hard to explain all the little things I do, also it is coded with constants that fit the lighting to my world size, etc. So the code would probably be more confusing, it'd be better to get the idea conceptually.

- Dan
_________________
I run this place.
"Some muckety-muck architecture magazine was interviewing Will Wright about SimCity, and they asked
him a question something like "which ontological urban paridigm most influenced your design of the simulator,
the Exo-Hamiltonian Pattern Language Movement, or the Intra-Urban Deconstructionist Sub-Culture Hypothesis?"
He replied, "I just kind of optimized for game play."

Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Radioactive-Software Forum Index -> Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group