Is it possible to sample an input texture in a Direct2D vertex shader?

I am trying to sample from an input texture in a vertex shader in a Direct2D effect that distorts the image by shifting vertices based on vectors stored in the input texture. However, whenever I try to sample from an input texture in my vertex shader the sampling function returns 0.

I haven't been able to find anything suggesting that this is definitively possible or impossible so that's my main question.

There are several examples of doing this in Direct3D but I would rather use Direct2D exclusively if possible. Sample code would obviously be appreciated. If this turns out to be possible and I'm doing something wrong I'll post my code.
What code have you written so far?
This is what I'm trying to use in my vertex shader:

1
2
3
4
    float2 ret;
    ret.x = input.meshPosition.x * sceneToInput0X[0] + sceneToInput0X[1];
    ret.y = input.meshPosition.y * sceneToInput0Y[0] + sceneToInput0Y[1];
    float4 offset = InputTexture.SampleLevel(Sampler, ret, 0);


The problem is that offset is always a zero vector. The best explanation I can find is that the input texture isn't bound to the vertex shader, only the pixel shader. Direct3D has a way to bind a texture to a vertex shader (VSSetShaderResources) but I can't find anything similar in Direct2D.
Topic archived. No new replies allowed.