Author |
Topic: GPU Mandelbrot Viewer (Read 1639 times) |
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
GPU Mandelbrot Viewer
« Thread started on: Nov 16th, 2010, 04:19am » |
|
I have made a GPU Mandelbrot Viewer.
http://tech.groups.yahoo.com/group/bb4w/files/Graphics/MandelBrotGPU%20v1.00b.exe
Controls are:
Cursor Keys : Pan around image =/- : Increase/Decrease Iteration count. Right Mouse button : Zoom In Middle Mouse Button : Zoom Out
The speed of this Mandel Viewer depends entirely on your graphics card so better GPU = faster rendering.
If you have DirextX11, try the program first. It *might* run although you may need to install DirextX9.
It requires DirectX9 already installed on your system and a graphics card capable of pixel shader 3.0. If you don't have DirectX9 you can install it from here :
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&displayLang=en
Version History:
Version v1.00b: 1. Made the Maximum iteration count unlimited.
2. Made the frame rate 'unlimited' even faster.
On my desktop system (Quad Xeon, Radeon 5900 ATI graphics card) I get the following frame rates....and I swear these are true!!
All in 'windowed' mode and 'Unlimited' frame rate: 1. Initial view and 63 iterations 2500 fps 2. Zooming way outside set, 63 interations ~5500 fps 3. Zooming way outside set, 1,075,180 iterations ~4800 fps. 4. Zooming to center of set 63 iterations ~1200 fps 5. Zooming to center of set 1,075,180 iterations ~316 fps (can it really do this?)
Note that I still haven't update the colour algorithm to take into account of the number of iterations so you won't actually see anything when the iteration count goes too high...
Version v1.00a (not available anymore) are: 1. Uses a 32x32 pixel texture and then scale transforms this to the screen thus saving a lot of video memory.
2. Fullscreen option. At the moment chooses 1600x1200 display, windowed is 640x512. I will probably add an option for the user to choose the display dimensions themselves.
3. vsync / no vsync option. The no vsync option sets the D3DPRESENT_PARAMETERS.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE. You may therefore see more stuttering/shearing or tearing effects when rendering and you might also see the Mandel Iterations being performed. In windowed mode with 'unlimited' framerate set I can get 100-130 fps with the maximum iteration count.
4. You can set the number of iterations with =/- (+/-) keys. Increasing or decreasing the iteration count by 5% each time. You may see changes in the colour palette as you do this. As yet I have not auto adjusted the Colour to take account of the number of iterations. Minimum iterations is 63 and maximum is 1063 at the moment. I am unsure of the effects on the pixel shader/graphics card of increasing the iteration count too high.
5. Other small bug fixes / code tidy.
|
|
|
|
Malcolm
Guest
|
 |
Re: GPU Mandelbrot Viewer
« Reply #1 on: Nov 16th, 2010, 9:33pm » |
|
Are you sure about this DX9. It worked for me with DX11 in Win7 and I sure would not want to screw up my machine adding components that might interfere with later versions.
I would say try it first before you start downloading DX9.
|
|
Logged
|
|
|
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
Re: GPU Mandelbrot Viewer
« Reply #2 on: Nov 17th, 2010, 12:40am » |
|
DierectX11 must be backwards compatible with Dx9 or you have previously played a DX9 game and it is preinstalled if it running in your system. It must mean you have the D3DX9.DLL in your system folder somewhere...
You obviously don't need to load the D39 stuff. So stay as you are. Interesting to hear that it worked though.
Michael
|
|
Logged
|
|
|
|
Matt
Developer
member is offline


Gender: 
Posts: 210
|
 |
Re: GPU Mandelbrot Viewer
« Reply #3 on: Nov 17th, 2010, 05:12am » |
|
Get the message: 'Could not find the effect: Mandelbrot'
Am I doing something wrong?
Matt
|
|
Logged
|
|
|
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
Re: GPU Mandelbrot Viewer
« Reply #4 on: Nov 17th, 2010, 06:03am » |
|
Well, yes and no!
At the moment if you get that error message I am not quite sure what is going on as it seems that the effect is being properly compiled but then not able to 'FindFirstValidTechnique'. I haven't come accross this before and am not sure how to interpret it yet.
Have you got any other information available ie:
1. Operating System 2. DirectX version 3. Graphics card type and memory. 4. anything else you can think of (ha ha)
?
Michael
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: GPU Mandelbrot Viewer
« Reply #5 on: Nov 17th, 2010, 08:10am » |
|
on Nov 17th, 2010, 06:03am, Michael Hutton wrote:I haven't come accross this before |
|
I reported the identical error message, which you acknowledged on the group yesterday.
Quote:I am not quite sure what is going on as it seems that the effect is being properly compiled but then not able to 'FindFirstValidTechnique' |
|
How do you know that the machine has a suitable D3DX9_xx.DLL? For example the highest version on my PC is D3DX9_32.DLL but I've seen several references to D3DX9_42.DLL being required by some programs.
Perhaps it would be helpful if your program reported which DLL it was using, then maybe you could correlate that with success/failure.
Richard.
|
« Last Edit: Nov 17th, 2010, 09:27am by admin » |
Logged
|
|
|
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
Re: GPU Mandelbrot Viewer
« Reply #6 on: Nov 17th, 2010, 10:25am » |
|
on Nov 17th, 2010, 08:10am, Richard Russell wrote:I reported the identical error message, which you acknowledged on the group yesterday. |
|
Yes, I know. I should have said 'come accross it before this end....' <sigh>
on Nov 17th, 2010, 08:10am, Richard Russell wrote:How do you know that the machine has a suitable D3DX9_xx.DLL? For example the highest version on my PC is D3DX9_32.DLL but I've seen several references to D3DX9_42.DLL being required by some programs. |
|
What is failing is: the ID3DXEffect::FindNextValidTechnique. With a quick search I can't find anything related to different dll versions, but maybe something will get dug up (No doubt by you in a few minutes...).
Code:
REM ****************************************************************
REM
REM Load and compile the Effect file
REM
REM ****************************************************************
IF V% THEN PRINT"Compiling Effect File."
SYS D3DXCreateEffectFromFile%, pDevice%, ShaderVersion$, 0, 0, 0, 0, ^Effect%, ^Errorlog%
IF Effect% = 0 THEN
SYS !(!Errorlog% + 12), Errorlog% TO B%
ERROR 100, "Failed to Compile Effect. Sorry, you do not appear to be able to compile this shader with your graphics card.."+CHR$13+CHR$13+$$B%
ENDIF
REM ****************************************************************
REM
REM Find the first Valid technique in the Effect file
REM This is the Mandel effect
REM
REM ****************************************************************
IF V% THEN PRINT"Getting Effect Mandel."
REM ID3DXEffect::FindNextValidTechnique
SYS !(!Effect% + 240), Effect%, 0, ^Technique1% TO R%
IF R% THEN ERROR 100, "Could not find the effect : Mandelbrot"
I have recompiled a version to use the _32.dll. If this works for you then that could explain the problem, but it 'works here fine'.
http://tech.groups.yahoo.com/group/bb4w/files/%22Temp%20Folder%22/MDCH/MandelGPU/MandelBrotGPU%20v1.00a%20limited%20to%20D3DX9_32.exe
Btw I am uploading as exes at the moment to keep all the code in one place.. I will publish it all but it needs to be tidied. A lot of device querying could be done.
Oh.... and in fact I think I don't even have to use that function at all.
http://tech.groups.yahoo.com/group/bb4w/files/%22Temp%20Folder%22/MDCH/MandelGPU/MandelBrotGPU%20v1.00a%20limited%20to%20D3DX9_32%20without%20%27that%27%20fn.exe Michael
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: GPU Mandelbrot Viewer
« Reply #7 on: Nov 17th, 2010, 1:23pm » |
|
on Nov 17th, 2010, 10:25am, Michael Hutton wrote:Oh.... and in fact I think I don't even have to use that function at all. |
|
OK, that version produces no error messages, and reports a frame rate of 85 fps (my native hardware refresh rate) but displays only a black window! Absolutely no graphics displayed at all. 
Richard.
|
|
Logged
|
|
|
|
Matt
Developer
member is offline


Gender: 
Posts: 210
|
 |
Re: GPU Mandelbrot Viewer
« Reply #8 on: Nov 17th, 2010, 6:25pm » |
|
I'm using XP with DirectX9 on my netbook. No idea about anything else you might need to know. Not sure where to find out about the graphics 'card'.
Matt
|
|
Logged
|
|
|
|
|