• Advertisement
Sign in to follow this  

HLSL Texture lookup to a larger texture

This topic is 1896 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

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

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


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

  • Advertisement