Jump to content

  • Log In with Google      Sign In   
  • Create Account


vs 5_0 texture sampling


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 ekba89   Members   -  Reputation: 437

Like
0Likes
Like

Posted 30 April 2014 - 12:39 PM

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]


Sponsor:

#2 mhagain   Crossbones+   -  Reputation: 7817

Like
1Likes
Like

Posted 30 April 2014 - 01:23 PM

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.


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#3 ekba89   Members   -  Reputation: 437

Like
0Likes
Like

Posted 30 April 2014 - 02:24 PM

Thanks for the answer. Yeah I need linear filtering so I will try changing my texture to r32g32b32a32.



#4 ekba89   Members   -  Reputation: 437

Like
2Likes
Like

Posted 30 April 2014 - 02:33 PM

Yeah that fixed my problem thanks for the help.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS