Jump to content

  • Log In with Google      Sign In   
  • Create Account

HLSL Texture lookup to a larger texture


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 Nisi   Members   -  Reputation: 103

Like
0Likes
Like

Posted 11 November 2012 - 09:10 AM

Hey,
first of all sorry for my bad english: =)

I have a problem with HLSL Shader 3.0 dx9. I want to make a look up into a Texture1d/sampler1 via tex1(sampler, x).

My problem ist, that i set a render target with the size of 64 * 880 and i cant look up into a 1d texture with the size of 256 * 1 (LUT, 1d texture) in my pixel shader. In this texture are values that i want to use for some calculations but i cant reach the float4 values > 64 (in texture coords) out of the texture, it just wraps (or clamp) when i set the AddressU/V values. Am i missing something important? Do i need to set some flags for the sampler or maybe sampler stages? Or is it just impossible?

One solution is to set a texture with the size of 1 * 256 (vertical) but i want to use a 1d texture with x coords.

The 64, 880 is a D3DFMT_A8R8G8B8 Rendertarget and the LUT is a D3DFMT_A32B32G32R32F.

I hope someone can help me with that.

Bye Nisi

Edited by Nisi, 11 November 2012 - 09:26 AM.


Sponsor:

#2 Nisi   Members   -  Reputation: 103

Like
0Likes
Like

Posted 11 November 2012 - 12:08 PM

Okay, i just screwed up my calculation of the offset variable.
My offset was lager than 1.0. Of course it will wrap over 1.0

Sorry for that.. just worked to long today.




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