Jump to content

  • Log In with Google      Sign In   
  • Create Account


direct3d question


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   -  Reputation: 300

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?



Sponsor:

#2 Nik02   Crossbones+   -  Reputation: 2641

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   Crossbones+   -  Reputation: 1845

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 1988"

 

rocklandsoftware.net

 





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.



PARTNERS