Advertisement

Sample MSAA texture in shader

Started by May 19, 2020 04:54 AM
1 comment, last by ChubbyLizard 4 years, 8 months ago

How do I read a MSAA texture in a compute shader? I don't want to access individual sub-samples. I just want to read the resolved pixel (w/o sampling if possible) and write back to the MSAA texture. OR do I have to manually resolve the samples? OR do I need to do the work for each sub-sample?

So for example,

Texture2DMS tex;
float4 color = tex[pos]; // no sampling just get the value resolved. Can I access x,y position?
color = process(color);
tex[pos] = color; // write back to MSAA texture, what happens here? How are the sub-samples handled?

You may have a look at this method if you are using D3D11:
ID3D11DeviceContext::ResolveSubresource

This topic is closed to new replies.

Advertisement