Jump to content

  • Log In with Google      Sign In   
  • Create Account


hlsl texture Sample result?


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
1 reply to this topic

#1 jedi knight CY   Members   -  Reputation: 107

Like
0Likes
Like

Posted 18 May 2012 - 10:14 PM

i have a texture with a DXGI_FORMAT_A8_UNORM format. in hlsl:

float4 color = tex.Sample(sample_state, Texcoord.xy);

then i got the color with a correct alpha channel result and the each r/g/b channel result of 0.

is there any way to get other specified rgb result, when the texture's DXGI_FORMAT has no rgb channel component? thx

Sponsor:

#2 MJP   Moderators   -  Reputation: 10143

Like
1Likes
Like

Posted 19 May 2012 - 11:10 PM

There's no way to specify the value that you get for channels that aren't present in the texture. In fact I don't think the documentation even specifies what the value should be, so I don' t know if you could even rely on it being 0 on all hardware.




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