Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to do .png image blur using DirectX9 without using advance 3d features HLSL / Per Pixel motion blut / Vertex Shader
    primarykey
    data
    text
    <p>Can anyone please help me how to do .png image blur using DirectX9 (2d graphics feature of d3d) without using the advance 3d features like High Level Shader Language(HLSL), Direct3D Per Pixel Motion blur and Vertex Shader.</p> <h2>Detailed explanation:</h2> <p>I've a row of 6 adjacent .png images(6 Sprite textures) on a surface and then I continuously moving/changing the texture locations in a circular fashion (1->2->3->4->5->6->1->2->3->4->5->6) with varying alpha component for getting the feel of spinning effect (2 dimensional spinning).</p> <h2>Problem:</h2> <p>Even with varying sprite texture alpha values and varying frame per sec(fps) I didn't get the real feel of spinning apart from continuous image change. After so many web search I found the clue that it is possible to get the spinning effect if I apply the blur effect(Gaussian blur / box blur) in .png file on the fly. </p> <p>But due to 3d support restriction in my target platform I can't use the advance 3d features of direct3d apart from 2d features for getting the spinning effect (kind of motion blur).</p> <p>I warmly welcome the forum member for their kind help / suggestion / Sample code / directing me to right path for solving this problem.</p> <h2>Sample Code:</h2> <pre><code>void D3DGraphics::DrawSprite(LPDIRECT3DTEXTURE9 &amp;texture,ID3DXSprite* pSprite, DXVECTOR2 Trans_11, int ImgIndex) { D3DXMATRIX Matrix; pDevice-&gt;Clear( 0,NULL,D3DCLEAR_STENCIL,D3DCOLOR_XRGB(0,0,0),0.0f,0 ); pSprite-&gt;Begin(D3DXSPRITE_ALPHABLEND); D3DXMatrixTransformation2D(&amp;Matrix, NULL, NULL, NULL, NULL, 0, &amp;Trans_11); pSprite-&gt;SetTransform(&amp;Matrix1); --&gt; Need blur effect before write operation / while loading .png file as texture &lt;--- pSprite-&gt;Draw(texture[ImgIndex], NULL, NULL, NULL, 0xFFFFFFFF); pSprite-&gt;End(); </code></pre> <p>}</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload