Sign in to follow this  

Adding multiple lights to a shader

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?




Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this