Jump to content
  • Advertisement
Sign in to follow this  
davepl1968

Adding multiple lights to a shader

This topic is 1928 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been writing shaders by hand so far, and thought I'd play around with FX Composer.  I started with a Blinn shader, did my little billiard ball specular highlight, worked fine.

 

When I went to add a second light, however, I was stuck.  You can add as many lights to the "scene" as you want, but it doesn't change or update the shader.

 

I had -imagined- that if I added more lights it would in turn update the HLSL code, adding those lights into the diffuse/specular/lambert calculations.  But it doesn't seem to.

 

So before I spend a bunch more time trying to figure out -how- to make FX Composer do the work for me, can it even do so?

 

Certainly I can hand-code in the text editor window the code needed to handle a second light source, but that's only a step up from notepad.  Can someone tell me if I suffer from incorrect expectations or if FX Composer doesn't even do this?

 

Thanks!

Dave

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!