Original Post
Hello, I have just started learning dirextX shaders(HLSL). I wrote a simple shader for diffuse, ambient and specular lighting. It worked fine. Now I want to learn the tecnique of rendering to a texture which can then be used as a buffer of information for a lot of things. So I wrote a test program in which I had two textures of format D3DFMT_A32B32G32R32F. One to store some data and other as a render target I intialize the first texture with some data and then render it to the second texture using a pixel shader then I try to copy the data to a third texture from the rendered texture. But the data I am getting back is not the same as the data I had input. What could be the problem. The pixel shader is very simple as it just copies the input data. sampler tex; float4 PSMain( float2 tex0: TEXCOORD ) : COLOR { tex2D( tex, tex0 ); } It is a simple program in which some data in stored in a texture, copied as it to some texture(render target) using a pixel sahder and then coping it back to the another texture. I am learning this stuff by reading the documentation and studying the sample programs on the net as I am in no position to by books and study. Thanks