Skip to main content
GameDev.net gamedev.net
🔒 Locked 🎮 Unity

Shader blur (VB.net + DirectX)

Started by kultys Sep 4, 2008 at 3:19 PM 0 replies 1.5k views
Original Post
kultys
kultys
Sorry for stupid question... I have my code which displays objects:

Dim newZStencil As Surface = Device.GetBackBuffer(0, 0, BackBufferType.Mono)

Do While brun = True
Device.SetRenderTarget(0, newZStencil)
Device.Clear(ClearFlags.Target Or ClearFlags.ZBuffer, Color.Black, 1.0F, 0)
Device.BeginScene()
 ' First object
            Device.Transform.World = Matrix.Translation(New Vector3(0,0,0))
            For i = 0 To matObject1.Length - 1
                'Device.Material = materials3(i)
                Device.SetTexture(0, texObject1(i))
                objObject1.DrawSubset(i)
            Next
 ' Second object
            Device.Transform.World = Matrix.Translation(New Vector3(0,0,0))
            For i = 0 To matObject2.Length - 1
                'Device.Material = materials3(i)
                Device.SetTexture(0, texObject2(i))
                objObject2.DrawSubset(i)
            Next
Device.EndScene()
            Device.Present()
            Application.DoEvents()
Loop
And i need add for this 2 object effect blur from .FX file (Shader). Please help me, i dont now where and what i must add for this code. VERY VERY thanks for help.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.