direct3d question

Started by
1 comment, last by Norman Barrows 10 years, 9 months ago

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?

Advertisement

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.

Niko Suni

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.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

This topic is closed to new replies.

Advertisement