I'm doing a shader for shadow mapping right now, and I've got a quick question: how do you set 3d vectors in the effect file? SetVector() only lets you do 4d ones, but my position vectors in the shader are defined as float3. Thanks!
Setting float3 vectors
4 replies to this topic
Crossbones+ - Reputation: 2383
Posted 12 April 2013 - 01:26 PM
Or use SetValue
D3DXVECTOR2 SomeFloat2; effect->SetValue( "SomeFloat2", SomeFloat2, sizeof(D3DXVECTOR2) ); D3DXVECTOR3 SomeFloat3; effect->SetValue( "SomeFloat3", SomeFloat3, sizeof(D3DXVECTOR3) ); D3DXMATRIX SomeMatrix; effect->SetValue( "SomeFloat4x4", SomeMaxtrix, sizeof(D3DXMATRIX) );
Edited by belfegor, 12 April 2013 - 01:29 PM.