[ad_1]
Recreation Improvement Stack Trade is a query and reply web site for skilled and unbiased sport builders. It solely takes a minute to enroll.
Anyone can ask a query
Anyone can reply
The perfect solutions are voted up and rise to the highest
Requested
Considered
2 occasions
I’m trying to obtain the next: I’ve a compute shader that receives a Texture2D as enter, the place a small share of the pixels within the texture are white. The situation of the white pixels are unpredictable for any given body. I wish to learn the depth worth at these white pixels and retailer them in reminiscence. I cant put them in a RWStructuredBuffer as a result of there isn’t any option to forestall every thread from overriding one other thread when storing values to the buffer. In fact I may assign every thread its personal place within the buffer, BUT THEN THIS WOULD INCLUDE ALL non-white pixels. I solely wish to retailer the values from white pixels, so the buffer could be a lot smaller in measurement than the feel. I can obtain this with an append buffer, just by having solely the white pixels append to the appendbuffer. However I do not know the way I can then subsequently READ from that appendbuffer in the identical compute shader. Is that doable?
$endgroup$
You could log in to reply this query.
default
[ad_2]