Jump to content
  • Advertisement
Sign in to follow this  
Formski

HLSL - accessing on-screen pixel colour

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

Hi all, I'm currently using Direct3D9 and implementing water reflection and refraction. Is it possible in HLSL using Pixel Shader 2.0 and above to access a pixel already written to the target buffer? Reason is that I want to draw the terrain including those sections under water and then use the underwater as my 'refraction'. Thanks in advance Formski

Share this post


Link to post
Share on other sites
Advertisement
but you can render refraction surfaces to render target (separate pass) and pass it to water ps (when rendering water surface)

Share this post


Link to post
Share on other sites
I currently am doing a separate pass for refraction. Only problem is that with my current setup my old Mobility Radeon 9700 is croaking, so I'm looking to see what can be done to speed things up.

I might try rendering the whole scene first to a texture then use that for both refraction and final display.

Formski

Share this post


Link to post
Share on other sites
i'm using my ambient pass to generation refraction map,
in my ambient pass i'm rendering all none refractive surfaces, then i render all refractive surfaces to the alpha channel only to mask pixels the lies outside.
for example you don't want to apply perturbation effect on pixels that isn't water surface pixels.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!