How to apply blur effect over region of texture using directx11

Started by
9 comments, last by dave09cbank 7 years, 9 months ago

Ok i figured it as to why it was happening.

Reason being i was setting the verted buffers on the wrong slot to 1 instead of 0.


DxDevice.ImmediateContext.InputAssembler.SetVertexBuffers(1, new VertexBufferBinding(m_displayQuadvertices, VertexPositionTexture.SizeInBytes, 0));

But i cant i'm not sure as to why this would make it work ? Could anyone explain the reason as to why ?

Also @Nanoha

Those boxes are just quads? If so this should be quite easy (a little more tricky if it is a mask texture). Your actual image is just a texture so draw that first. Then draw your quads, make sure the quads have appropriate texture coordinates such that if you drew them textured (with the background image) they would show the exact part of the image they cover. When you draw those quads you just draw them with a blur shader which samples from your main image/background.

Is masking a texture better approach than drawing multiple objects (quads/shapes) filled with either color or texture ?

This topic is closed to new replies.

Advertisement