Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Image class still needed ?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 Alundra   Members   

2307
Like
0Likes
Like

Posted 17 March 2013 - 08:46 AM

Hi,

With the advance of technology now you can read and write directly on the texture and more fast than on CPU.

A lot of engine or application have an image class who is used to work on image data.

Do you think it's still needed or compute shader is enough for all ?


Edited by Alundra, 17 March 2013 - 09:08 AM.


#2 metsfan   Members   

678
Like
1Likes
Like

Posted 17 March 2013 - 02:37 PM

It really depends on what you need to do.  For instance, let's say that I want to apply an alpha mask to an image.  If the mask changes often, or if I want to maintain the original image without the extra memory overhead of creating a copy, then applying the mask on the GPU makes sense.  However, if the mask never changes, it only needs to be applied once, and it isn't necessary to maintain the original image, then it makes sense to do it on the CPU, and save my GPU clock cycles for things that actually do need to be computed every frame.  It's a matter of what your needs are.   Really this is the question you should be asking yourself:  "Does this NEED to be updated every frame, or is this something that can be computed once, cached, and reused?"  



#3 Alundra   Members   

2307
Like
0Likes
Like

Posted 17 March 2013 - 04:17 PM

It can be applied once using a compute shader, just send the texture as a read-write and no one lock/unlock used.

CPU<->GPU = 1GB/s

GPU<->VRAM = 100GB/s


Edited by Alundra, 17 March 2013 - 04:33 PM.





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.