Archived

This topic is now archived and is closed to further replies.

PixelShader problem

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

I'm trying to add some sort of image-space motion blur to my game, but since friday I haven't had any success in writing a working pixel shader for this job. At the moment I'm doing the follwing: 1. Render the scene to texture A. 2. Render projected movement-vectors of the scene's object to texture B. The vectors are 3d (along x and y-axis) and scaled to the range of [0;1]. 3. Here's where I'm experiencing problems: I'm rendering a screen-aligned rect with set texture coordinates ([0,0] in top left / [1,1] in bottom right corner) to the screen. I'm supplying texture B (with the movement vectors) in sampler 0, and texture A in sampler 1. Addressing modes are: clamp. The vertexshader passes the screen-aligned rect's texcoords to the pixelshader (in t0 and t1). The pixel shader looks like this: The shader compiles without problems, but its output is totally screwed up! It seems that sampling texture A using the calculated texture coordinates doesn't work ... Now if I modify the pixel shader to directly output the texture-coordinates to the screen it looks okay, so the actual calculation of the texture coordinates seems to work. It's also no problem to sample texture A using the texture coordinates from the vertex shader. I'm at a total loss here, please help! I've installed the latest drivers (Catalyst 4.2) for my Radeon 9000; DirectX debug output doesn't contain any errors or warnings ... Stephan EDIT: fixed images ... [edited by - Reita on February 22, 2004 12:08:30 PM]

Share this post


Link to post
Share on other sites