Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
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

direct3d question

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 lomateron   Members   

491
Like
0Likes
Like

Posted 09 July 2013 - 07:16 PM

I am rendering to a texture that has some random values

 

I am rendering to it using point list

 

I am rendering points to some random texels and sometimes more than one point writes to the same texel

 

When this happens I want the values that the points write to add

 

At the same time I want that this value that is the addition of the values to replace the value that was already in the texel before calling the draw function

 

I am doing this now by using the clear render target function and then calling the draw method using blending.

 

Is there a faster way to do this without having to use the clear render target function?



#2 Nik02   Members   

4297
Like
0Likes
Like

Posted 10 July 2013 - 06:56 AM

The additive blending alone results in dest = src + dest. Why do you need Clear RT here?

 

Note that if your actual intent is to get rid of all the RT contents, then Clear is the fastest way to do that.


Edited by Nik02, 10 July 2013 - 06:58 AM.

Niko Suni


#3 Norman Barrows   Members   

7149
Like
0Likes
Like

Posted 10 July 2013 - 09:56 AM

since its just points, perhaps just do it yourself in a buffer in ram, then lock and copy the results to a texture.

 

rendering a point list to a texture with randomness sounds a lot like using the graphics engine to procedurally generate a texture. it may be faster to do it yourself in ram.

 

but as stated above the blendop you want is one of the supported ops in the graphics engine.


Edited by Norman Barrows, 10 July 2013 - 09:59 AM.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

 

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

 

 





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.