Sorry Josh, I wasn't being coy. I just meant the easiest way to set up nice looking segment shaders without going into tons of technical detail would be to get my pack to use as a template, since the default segment shaders included with FPSC leave something to be desired...
Your shader most likely won't work with FPSC. This is because FPSC is a game engine that has it's own lighting system that passes specific information to the shader system in order to work. Using just any old shader will make the item stick out like a sore thumb.
Here is your documentation on shaders for FPSC:
The first texture loaded by FPSC is the lightmap, it is auto-generated by FPSC. So the first sampler in your shader code is reserved for this texture. The following four textures are the object textures, and you will need to set up samplers for each one in the shader. In order they are:
1. mytexture_D
2. mytexture_N
3. mytexture_I
4. mytexture_S
Now, for normal mapping, things get tricky for segments. FPSC does not pass TANGENT and BINORMAL vectors for segments that use the lightmapper. This means you must calculate these vectors on the fly within the shader code - which is exactly what my new segment shader does.
There are a few other shader variables to keep in mind. "Surfcolor" is a shader variable that samples the lightmap color the entity is on. This keeps your object's lighting integrated with it's environment, so they don't stick out at full brightness on a pitch black area of the lightmap. "Ambicolor" is another variable that passes the current ambient color to the shader. Again, this forces your model to respect the overall ambient lighting in FPSC. "LightSource" is a third variable passed to the shader system. This pulls the DIRECTION of the nearest light in FPSC, so your model is shaded correctly depending on where you place your lights. These three variables need to be figured into your final lighting eguation in the shader code.
Hope this helps. I think most FPSC users don't have the patience to delve this deep into HLSL coding. Which is why it's just easier to use my model pack's shaders that have all this pre-setup and ready to use.
----------------------------------------
"bond1 - You see this name, you think dirty."