Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
Anonymous
unregistriert
Zitat
Das problem dabei ist, dass dadurch immer nur ein licht berechnet werden kann. Auch ist die Farbe unveränderbar.
Quellcode |
|
1 2 3 |
m_pd3dDevice->SetTextureStageState( 1, D3DTSS_COLORARG1, D3DTA_CURRENT); m_pd3dDevice->SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_DOTPRODUCT3 ); m_pd3dDevice->SetTextureStageState( 1, D3DTSS_COLORARG2, D3DTA_TFACTOR ); |
Anonymous
unregistriert
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
// Texturen setzen m_pD3DDevice->SetTexture(0, pRenderset->getTextureDiffuse()); m_pD3DDevice->SetTexture(1, pRenderset->getTextureBump()); DWORD dwFactor = VectortoRGBA( pLight1->vPos , 0.0f ); m_pD3DDevice->SetRenderState( D3DRS_TEXTUREFACTOR, dwFactor ); // Set the color operations and arguments to prepare for bump mapping. // Stage 0: The base texture m_pD3DDevice->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_MODULATE ); m_pD3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE ); m_pD3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE ); // Stage 1: The bump map - Use luminance for this example. m_pD3DDevice->SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_DOTPRODUCT3); m_pD3DDevice->SetTextureStageState( 1, D3DTSS_COLORARG1, D3DTA_CURRENT ); m_pD3DDevice->SetTextureStageState( 1, D3DTSS_COLORARG2, D3DTA_TFACTOR ); |
Anonymous
unregistriert
Anonymous
unregistriert
Werbeanzeige