using Vertex Texture Fetches in HLSL
Hi all,
Im currently trying to implement Vertex texture fetches in HLSL, but realised that the current HLSL doesnt support it, is there a workaround to this other than writing the shader in asm?
I read up on Shader Fragments and am still not sure of how to link asm with HLSL. Any kind of advice/help will do.
Thanks in Advance
~JExoskeleton
Are you sure it is not supported? Have you tried using text2D() or tex2Dlod() in VS?
Anyway, you could try to ask microsoft directly (directx@microsoft.com), as this looks like serious bug...
Anyway, you could try to ask microsoft directly (directx@microsoft.com), as this looks like serious bug...
Quote:Original post by JExoskeleton
Hi all,
Im currently trying to implement Vertex texture fetches in HLSL, but realised that the current HLSL doesnt support it, is there a workaround to this other than writing the shader in asm?
I read up on Shader Fragments and am still not sure of how to link asm with HLSL. Any kind of advice/help will do.
Thanks in Advance
~JExoskeleton
Use tex2Dlod,example:
sampler T;
float4 main(float2 coord : TEXCOORD ) : POSITION
{
return tex2Dlod(T,float4(coord, 0, 0));
}
produces:
vs_3_0
def c0, 1, 0, 0, 0
dcl_texcoord v0
dcl_2d s0
dcl_position o0
mul r0, c0.xxyy, v0.xyxx
texldl o0, r0, s0
Hi,
The vertex texture must be on a certain format : D3DFMT_R32F or D3DFMT_A32B32G32R32F (32 bits floating point textures)
It also must be created in the default pool.
Other than that, it's available only on recent hardware (GeForce 6xxx series, I don't know if ATI handles it) and throught sm 3.0 (EvilDecl81 gave the functions to access vertex textures in shaders)
The vertex texture must be on a certain format : D3DFMT_R32F or D3DFMT_A32B32G32R32F (32 bits floating point textures)
It also must be created in the default pool.
Other than that, it's available only on recent hardware (GeForce 6xxx series, I don't know if ATI handles it) and throught sm 3.0 (EvilDecl81 gave the functions to access vertex textures in shaders)
Hi again,
You sure it worked in VS 3.0 profile and not PS 3.0?
I was reading up on the mdsn directX page and all the texture fetch operations in HLSL doesn't support vs 3.0...
Maybe I'll try again later and see what happens.
I hope its just a mis-documentation of their API.. :)
Thanks all
~JExoskeleton
You sure it worked in VS 3.0 profile and not PS 3.0?
I was reading up on the mdsn directX page and all the texture fetch operations in HLSL doesn't support vs 3.0...
Maybe I'll try again later and see what happens.
I hope its just a mis-documentation of their API.. :)
Thanks all
~JExoskeleton
Quote:Original post by Anonymous Poster
Hi again,
You sure it worked in VS 3.0 profile and not PS 3.0?
I was reading up on the mdsn directX page and all the texture fetch operations in HLSL doesn't support vs 3.0...
Maybe I'll try again later and see what happens.
I hope its just a mis-documentation of their API.. :)
Thanks all
~JExoskeleton
Yup it works, thanks a million :)
~JExoskeleton
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement