I have a little problem with rendering to a surface. I want my 3D rendered model to be exported as surface or birmap, well by now I've almost made it to render to a surface with one little exception - the output image is very noisy and distorted, I've attached it with the topic.
here is my code:
Private RtsHelper As RenderToSurface Private RenderTexture As Texture Private RenderSurface As Surface Public Sub GetBitmap() RtsHelper = New RenderToSurface(D3Device, MyBase.window.Width, MyBase.window.Height, _ Format.X8R8G8B8, Format.D16) RenderTexture = New Texture(D3Device, MyBase.window.Width, MyBase.window.Height, 1, Usage.RenderTarget, Format.X8R8G8B8, Pool.Default) RenderSurface = RenderTexture.GetSurfaceLevel(0) Surface.ToFile(RenderSurface, "stf.bmp", ImageFileFormat.Bmp) End Sub
Can you tell me where I do things wrong, thank you!
Number of downloads: 14