Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Shader Effect Very Very Slow

Author
Message
DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 31st Jan 2012 01:35

You may download my example provided to see how slow the fx file is. It seems to run a tat too slow for my liking. Can anyone tell me why the program is running so slowly?

Thnx

Monsters are Ready to spill their Dark Sercrets......
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 31st Jan 2012 02:01
what graphics card do you have?

DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 31st Jan 2012 02:03
Quote: "what graphics card do you have?"

intel core i5 : intel hd graphics family

Monsters are Ready to spill their Dark Sercrets......
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 31st Jan 2012 05:08
Quote: "intel hd graphics family"

i would say your graphics card is the reason for the slowness

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 31st Jan 2012 12:40 Edited at: 31st Jan 2012 12:40
That would be my guess too. What FPS rate do you get?

I tried your demo and all it gave was a blue window.

Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 31st Jan 2012 21:16 Edited at: 31st Jan 2012 21:22
this is what i get (frame rate ~2000fps)


Edit:
i looked at shader code, it seems that it uses some textures you didn't provide, and it also has 2 techniques defined - 1 for dx9 and one for dx10, dx10 one is the default i think ->that could be also the reason for your slow down, try changing it to dx9 or stick to shaders that are made for dbpro

DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 31st Jan 2012 21:42 Edited at: 31st Jan 2012 21:52
Snap!! I didn't include the texture in the upload file!!
Silly me
Quote: "try changing it to dx9 "

Should I use 3DS MAX to change this?? I have no idea how to do that
Could the problem persist after the conversion?
Here is my updated code:

And again, the project (with the missing textures) may be downloaded. Again I apologize for forgetting to include the textures.

Monsters are Ready to spill their Dark Sercrets......
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 31st Jan 2012 21:48
Quote: "Should I use 3DS MAX to change this?? I have no idea how to do that"

no, notepad is good enough, shader is just a text file but, after taking another look i see that default is dx9 so the problem is definitely in your graphics card

DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 31st Jan 2012 21:54
I just updated the download, would you mind taking a look at my updated post sir?

Monsters are Ready to spill their Dark Sercrets......
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 31st Jan 2012 22:10 Edited at: 31st Jan 2012 22:11
DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 31st Jan 2012 22:20 Edited at: 31st Jan 2012 22:33
Alright now I am on an older XP system with an nvidia geforce 6100 series graphics card, should problems persist whilst on this machine?
Here are it's system specs: \/

Should this make a difference?

EDIT: I now get around 60-66 FPS
[img]C:\Documents and Settings\Owner\Desktop\Shot#01.bmp[/img]

Monsters are Ready to spill their Dark Sercrets......
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 31st Jan 2012 22:26
Quote: "Should this make a difference?"

that graphics card look quite old to me so i think it would be the same or maybe even worse. Try it and you'll see.

you need a newer graphics card, dedicated one, with at least 512 MB of VRAM

I have ATI mobility radeon hd 5470 with 512 MB VRAM and i get quite good result with shaders and can play moder games on low settings and thats quite a cheap card so if you can buy a new graphics card

DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 31st Jan 2012 22:36
Alright, I will look into doing that sometime or another. Thank you for your help.

Monsters are Ready to spill their Dark Sercrets......
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Feb 2012 02:23
Quote: "EDIT: I now get around 60-66 FPS"


Do you? But your code caps it at 60.

And your new download still just gives me a blank blue screen.

@Brendy Boy

What code did you use?
DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 1st Feb 2012 02:31
Quote: "And your new download still just gives me a blank blue screen."

i'd say perhaps you could have a graphics card problem too then.

Monsters are Ready to spill their Dark Sercrets......
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Feb 2012 02:45
Perhaps your code should say where the camera is supposed to be?

I doubt there's a problem with my card on this occasion - all the other water shader demos work fine.

The shader works fine in Dark Shader when I apply the textures to a suitable object - it's just your uploaded project that won't work for me in DBPro. Are you sure you've posted the right code? Also, the shader requires a cube/environment map. You don't seem to have posted one.
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 1st Feb 2012 03:42
Quote: "@Brendy Boy

What code did you use? "

i used the project from this post

DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 1st Feb 2012 03:56
Quote: "i used the project from this post"



Monsters are Ready to spill their Dark Sercrets......
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Feb 2012 12:20 Edited at: 1st Feb 2012 12:56
Quote: "Quote: "i used the project from this post""


So did I. However, you obviously changed it since you've got numbers showing on the screen. What other changes did you make?

I'll test this with my other machine - and perhaps an older version of DBPro as well to see if that changes things. At the moment I'm a bit baffled.

Edit Just tested this on my laptop. I now see the object but it's just black and that's with the textures in the right place. The only difference between the two DBPro installations is that the PC (where the object is invisible) has a more recent DX9 version (which means that exes produced on the PC won't run on the laptop - thanks to an update suggested by StabInTheDarkSoftware I suspect ).

This is rather weird. The PC has an nVidia GFX card and the shader is an nVidia shader. I've never encountered a problem like this before. I'll try pruning all the inessential stuff from the shader (such as the test for DX9/DX10) and see if the problem persists.

Edit2 Just downgraded to U75beta16 and then back to U77RC7 and the original code worked fine with both upgrade versions. So something in my setup had got screwed up somewhere. Strange that problems hadn't emerged with other projects though.

So I guess it wasn't a problem with my GFX card after all.

For the record I now get this:

DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 1st Feb 2012 21:35 Edited at: 1st Feb 2012 21:50
Quote: "However, you obviously changed it since you've got numbers showing on the screen"

Simple, All I did to get the screen to give the exact amount of frames per second (FPS) was add this simple line of code into the main loop.

Of course, I prefer the FPS being shown in the middle of the screen so I just add that in there nicely. btw, I had forgotten to set the Sync Rate back to 0 so that the program could run at maximum speed for my machine's video card. I still get a somewhat low frame rate though.

This Image is of the scene running in 640,480 screen resolution. Running the program in 1024,768 instantly drops the FPS down to 60-80. Any Idea what to do about this guys?

Monsters are Ready to spill their Dark Sercrets......
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 1st Feb 2012 22:00
Quote: "Any Idea what to do about this guys?"

there's nothing you can do except buy a new graphics card

DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 1st Feb 2012 22:21 Edited at: 1st Feb 2012 22:37
Found a Solution!!!!
Game Booster seems to raise up my FPS by an acceptable amount.
http://www.iobit.com/gamebooster.html

Very Nice speedup

Monsters are Ready to spill their Dark Sercrets......
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Feb 2012 23:51
Quote: "Quote: "However, you obviously changed it since you've got numbers showing on the screen"
Simple, All I did to get the screen to give the exact amount of frames per second (FPS) was add this simple line of code into the main loop."


Which is what I did of course.

The remark was intended for Brendy Boy who claimed to be using your code. It matters little now since there was obviously some weird glitch on my system which is now fixed.

For the record again, the reason your demo didn't work on my laptop was that the shader uses PS3 which isn't supported on my laptop. So both mysteries solved.
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 1st Feb 2012 23:54
Quote: "Which is what I did of course."

that's what i did too, nothing more

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Feb 2012 00:53
Thought so.

I was thrown by the unexpected system glitch and assumed you must have done something else as well. Which you hadn't of course.

Login to post a reply

Server time is: 2026-07-10 03:54:54
Your offset time is: 2026-07-10 03:54:54