[ad_1]
Sport Improvement Stack Trade is a query and reply website for skilled and unbiased sport builders. It solely takes a minute to enroll.
Anyone can ask a query
Anyone can reply
The very best solutions are voted up and rise to the highest
Requested
Considered
9 instances
I’m seeking to obtain the next: I’ve a compute shader that receives a Texture2D as enter, the place a small proportion 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 technique to forestall every thread from overriding one other thread when storing values to the buffer. In fact I might 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 can be a lot smaller in dimension 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 potential?
$endgroup$
1
You need to log in to reply this query.
default
[ad_2]