How to use SetLightDirection dynamically

Apr 12, 2016 at 5:20 PM
I'm trying to change light directions and ambient colours (amongst other light effects) in the DirectXTK Simple Sample, but the functions have absolutely no effect.

void Render()
g_pImmediateContext->ClearRenderTargetView( g_pRenderTargetView, Colors::MidnightBlue );
g_pImmediateContext->ClearDepthStencilView( g_pDepthStencilView, D3D11_CLEAR_DEPTH, 1.0f, 0 );

static const XMVECTORF32 vAmbient = { 0.4f, 0.4f, 0.4f };
static const XMVECTORF32 vDirection = { 0.5f, 0.5f, 0.0f };

g_BatchEffect->SetLightDirection(0, vDirection);

What is the correct way to change lighting effects dynamically.
Am I supposed to call some ID3D11DeviceContext function?