Quote Originally Posted by Clootie
Quote Originally Posted by gnoch
Hi Clootie, I'm actually using your DirectX headers, great work eheh
Thanks :roll:
I insist!

OK, opening DirectX 8.0 SDK help: page "Mathematics of Direct3D Lighting" or directly from here: Diffuse Lighting (DirectX 8.1 C++ Archive):
My... I actually read that page from the SDK yesterday! But didn't get much out of it

PS. You have to check is current card suports DIFFUSEMATERIALSOURCE at all (can't recall right now how to check this)
Are there actually cards that don't?

PPS. So, solution is to use COLOR1 and COLOR2 data field in vertex, and using COLOR2 to modulate material based color. Or move diffuce encoded alpha to light alpha and use DIFFUSEMATERIALSOURCE = D3DMCS_COLOR1. Or use COLOR1 and TFACTOR (skipping lighting altogeter)
Ouch... Didn't get it :-/
So, I should be putting two D3DCOLOR fields in my flexible vertex format? Then what...? (Sorry )