View Full Version : lighting question
01-30-2003, 10:17 PM
is it possible to activate lighting for texture unit 1 and deactivate it for texture unit 2-n ?
i need this because i want to use dynamic lighting for my landscape AND texture-blending by coverage factors.
The light never affects a texture unit, it affects the color of the object, that - modulated - with a texture gives it the illusion of affecting the texture.
you should use the Texture_env_combine extension. then you can modulate with the color in what ever stage you want.
01-31-2003, 01:47 AM
so it's not possible ?
Yes it is, with the texture_env_combine extension (and other more advanced extensions aswell).
01-31-2003, 03:04 AM
if i enable lighting, it's for all texture units.
so, i have to read the coverage-factors from another texture...
my problem is that i want to use lighting together with texture blending..
but maybe there's another solution (with no lighting at all)
@all who understand the coverage-thing :
in the delphi3d-article it is described how to blend 3 textures.
if i remember correctly, one texture is drawn 100% opaque, and the others are blended over it.
so, if i just don't draw the first (opaque) texture, everything that has already been drawn there should not be affected if i set the coverage factors to 0% & 0%. right ?
if so, everything is fine. if not, i'm unhappy.
thats because -> read my "pretty advanced outdoor engine"-thread.
[This message has been edited by HamsterofDeath (edited 01-31-2003).]
01-31-2003, 06:19 AM
>>>my problem is that i want to use lighting together with texture blending..
but maybe there's another solution (with no lighting at all)<<<
What's stopping you?
Tell me what the equation is and I'll give you code how to setup the combiners. Or wait until I post a download for people to test part of my software.
You can play with it and see what you need.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.