Jump to content
  • Advertisement
Sign in to follow this  
xprzemos

Remeber state of pixel in HLSL.

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

Hello, i have a little problem and i wanna know it's a good way to resolve it.
I change many pixel color on my application (cellular automata),
I swap render targets to get actual back-buffer and later i put it to my Pixel-shader, in next frame operation is repeat.
My problem i when wanna know the pixel is changed or not.

I know i can solve it by use one more render target and remember my specific data per pixel, but i think it can be made some performance issue. Maybe is some other way to do it. I use DirectX10.

Really thanks for help.

Share this post


Link to post
Share on other sites
Advertisement
Hmm if you said DX11 I would say use an unordered access view (UAV) and use it as a RWTexture2D in your pixel shader. It looks like those are only available in the compute shader for DX10.

Share this post


Link to post
Share on other sites
guess you could also solve it via stencil buffer. If pixel does not change, clip it, otherwise write one (or something else) in there. You can then use the stencil buffer to mask out only the changed/unchanged pixels.

Share this post


Link to post
Share on other sites
Really thanks everyone ,Hornsj3 yes i know it about DX11 but i write it to Windows 8 and tablets with Windows 8 have minimal hardware version DX10 so i must choose it if i want target to many people. Compute Shader is available from DirectX 10.1 :( Edited by xprzemos

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!