Hello all, so I'm doing some work with Shaders for the first time and I'd like a little help.
Lets say I want to have a box with a pretty texture appplied to it that uses Parallax Mapping. I light the scene not with ambient light or DB lights, but instead using the lightposition feature of the shader itself (applied using a vector). To do this, I'd use something like this:
SYNC ON
COLOR BACKDROP RGB(0,0,0)
LOAD IMAGE "Box_Texture.dds",1
LOAD IMAGE "Box_NormalMap.dds",2
LOAD IMAGE "Box_HeightMap.png",3
LOAD EFFECT "ParallaxMapping.fx", 1, 0
MAKE OBJECT BOX 1, 100, 100, 100
TEXTURE OBJECT 1, 0, 1
TEXTURE OBJECT 1, 1, 2
TEXTURE OBJECT 1, 2, 3
SET OBJECT EFFECT 1, 1
vec = MAKE VECTOR4(1)
SET AMBIENT LIGHT 0
HIDE LIGHT 0
SET EFFECT CONSTANT INTEGER 1, "LightRange", 500
SET VECTOR4 1, 300, 100, -300, 0
SET EFFECT CONSTANT VECTOR 1, "LightPosition", 1
DO
SYNC
LOOP
This applies one light to the object, set up by the vector.
What I want to be able to do, is to apply MORE than one light to the object. Is this possible? I tried creating another shader and applying both shaders to the object, but the second one just cancels out the first one...
When I use normal DB lights I can use 7 different lights, but basically I want to be able to replicate that using Shaders... Any ideas?
Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame