3 registered members (Ayumi, Akow, AndrewAMD),
1,505
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Fully working diffuse specular point lighting!
[Re: Matt_Aufderheide]
#20296
06/11/04 20:43
06/11/04 20:43
|
Joined: Oct 2003
Posts: 1,258 Virginia, USA
qwerty823
Senior Developer
|
Senior Developer
Joined: Oct 2003
Posts: 1,258
Virginia, USA
|
Quote:
lights cant really be blended with the current shader system. The reason is complicated.. basically, you need to pass a light vector to the shader.. this light vector has to come from the entity that is being lit.. there are only enough skills for one vector. material skills cant cut it because those can only be passed into it once per frame.. not per object. Also.. the number of passes is increased by 2 eveytime you want to render a light. The real way to blend per pixel lights is to do it in a difernt way.. a way not currently available. The a6 shader system is nice..but you need more skills to pass more light vectors.. of course you can fake it by adding in set lvectors.. but that only works for lights that have fixed positions.. like a sunlight.. in my system you can in fact have a fixed sunlight/ambient light as well as the point lights.. but the point lights can never mix. Until JCL adds in more skills or directly passes in the wed lighting info(more than just VecLight) you can never make the Doom3 engine remember though.. even in engines like Doom 3 you cant really mix more than a few lights or it becomes very slow..i would say 3 lights mixed is the realistic max..
Actually, I have a dll that I used to pass a 2nd matrix to a shader. Since the only matrix we have is the mtlMatrix, if you need to do more then one transform, you cant.
I've considered extending this dll to make calls to SetVertexShaderConstant and SetPixelShaderConstant, and then in the render_view (i think) callback, you can pass my.skill# to them to setup your own values. Not quite as elegant as the way its done in shaders, but if you have to have it, it would work.
Never argue with an idiot. They drag you down to their level then beat you with experience
|
|
|
|