You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers. No questions about C++ programming or topics which are answered in the tutorials!
I've got a problem... I'm searching the easiest way to light my models that use HLSL shaders.
When I load a HLSL shader for a model, the shading model swaps to constant, means that there is nomore D3DSHADE_GOURAUD shading or any other shading on it.
Of course I can easily program phong or gouraud shading into the HLSL shader itself - but this comes with a big discomfort.
When I calculate the light dependant shading parts in the shader itself, i must KNOW how many lightsources there are in the scene and how they're named, because irrlicht must give the variables that store the light positions or light directions to the shader. So everytime i change the lighting in the scene i must change the shadercode as well - additionally i think it is faster to use D3DSHADE_GOURAUD shading instead of calculating the shadin in the HLSL shader...
so i'd like to use the HLSL shader output as texturecolor, which is then shaded by a irrlicht standardmaterial . . . . or i want to multiply D3DSHADE_GOURAUD shading with the output values of my HLSL shaders . . . or whatever could solve my problem . . .