HLSL Texture lookup to a larger texture

Started by
0 comments, last by Nisi 11 years, 5 months ago
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
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.

This topic is closed to new replies.

Advertisement