I'm trying to access a texture in my vertex shader so that I can change the amplitude of my water waves based on said texture's 'b' (blue) value. Unfortunately, I get this error:
"error X4545: vs_2_0 target does not support texture lookups"
This is the part of my code that triggers the error (and I was careful not to have any pixels set to 0):
No, as the error says, SM2 doesn't support texture lookups in the vertex shader. You'll have to upgrade to at least vs_3_0 and ps_3_0 if you want to use this feature.
My target is high performance windows and XNA...hidef I think is what it is called.
I got the per-vertex texture access working. Ran into some problems (had to convert my Texture2D from the default format to Vector4 and change the shader to use point filtering)...but it seems to work. I'm not impressed with the HLSL documentation though...you'd think that switching shader models would be easier (not changing the number, fixing all the stuff that changing models breaks).