This is quite long, sorry :P

I'm using sdk_vertexlit_and_unlit_generic_bump_ps20 from the advanced
folder in the SDK shaders.  It's completely unmodified -- the only
change I've made is to spam the lighting information to console.

This is what happens when the player model steps outside (and into the
influence of the light_environment):
http://img398.imageshack.us/img398/4522/dx9shaderproblem16zv.jpg
http://img465.imageshack.us/img465/1517/dx9shaderproblem26co.jpg

This is what it should -- and occasionally does -- look like.
http://img263.imageshack.us/img263/4036/dx9shaderproblem36xm.jpg

For some reason, there's a second light acting on the model that's being
treated as a directional light (according to the lightCombo) even though
it doesn't seem to be directional light (the direction is a unit vector
in the x axis and the map has no lights of that type).  What's strange
is that the other light can be either in the first or second light slot
seemingly arbitrarily (though that lightCombo does specify two
directional lights so it wouldn't matter if that light actually was
directional).

There are also similar problems that are less obvious when moving
between lights inside buildings (point lights rather than directional)
-- instead of the smooth lighting transition that happens with the
default dx9 shaders, the lighting flickers when between some lights and
switches instantly and seemingly arbitrarily around.  Changing all
directional lights to behave light point lights in the shader itself
improves the worst of the problems -- namely, the bright coloured
lighting outside -- but the inconsistent lighting throughout levels is
still a big problem.

Has anyone else encountered this problem or have any ideas what might be
causing it anyway?

My best guess is that the lightCombo enumerations are out of sync with
what the current engine uses (and maybe some other stuff is out too) but
I don't think that's the whole story and I can't really see anything
obvious that could be causing it and I don't think the much of the
lighting code is exposed to mods.  I'd appreciate any help since we
can't move on with writing some custom player shader effects for our mod
until we have the basics working.

If you need any more info just ask.  Thanks! :)


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to