• Advertisement
Sign in to follow this  

vs 5_0 texture sampling

This topic is 1362 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a height map in my vertex shader that I use to move the vertex to right height. I use r32g32b32 texture. But when I create graphics device with debug flag I get the error below. Even though it shows me error everything works fine I mean I get the right height for the terrain. So do I need to change the format of my texture or is there a way to sample r32g32b32 textures on vertex shader?

D3D11 ERROR: ID3D11DeviceContext::DrawIndexed: The Shader Resource View in slot 1 of the Vertex Shader unit is using the Format (R32G32B32_FLOAT). This format does not support 'Sample', 'SampleLevel', 'SampleBias' or 'SampleGrad', at least one of which may being used on the Resource by the shader. The exception is if the corresponding Sampler object is configured for point filtering (in which case this error can be ignored). This also only applies if the shader actually uses the view (e.g. it is not skipped due to shader code branching). [ EXECUTION ERROR #371: DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_UNSUPPORTED]

Share this post


Link to post
Share on other sites
Advertisement

This is calling itself an error but my reading of it is that it really should be just a warning.  Let's look at the message itself:

 

 

This format does not support 'Sample', 'SampleLevel', 'SampleBias' or 'SampleGrad', at least one of which may being used on the Resource by the shader. The exception is if the corresponding Sampler object is configured for point filtering (in which case this error can be ignored).

 

So, if you're using Load you're OK.  If you're using point sampling you're also OK.  I assume that with height mapping either or both are true (although filtering modes don't make sense with Load); in that case you can quite safely ignore it.

 

If it really bothers you, you could switch to using DXGI_FORMAT_R32G32B32A32_FLOAT which should suppress the message.  You may even be able to stash some extra needed data into that free alpha channel.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement