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 / Can anyone help me fix this FX shader?

Author
Message
Chenak
23
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 9th Sep 2003 02:23
Hi there, i got this per pixel lighting shader and i cant get it to work, there are not any errors when it compiles but if it is applied to an object, the object disappears.

Can anyone help?



Thanks

Once you start down the Dark Path, forever will it dominate your destiny...
Neophyte
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 9th Sep 2003 07:30
Quick question: Whats your graphics card?
Chenak
23
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 9th Sep 2003 19:17 Edited at: 9th Sep 2003 19:41
GF4Ti4600, it should work with it cos i got the example program somewhere with source which is were the shader came from, the only prob is it's made in c/c++ and i cant understand a word of it .

i dont have to do a load of maths n stuff within dbpro do i? if so can u tell me how do it please

Once you start down the Dark Path, forever will it dominate your destiny...
Neophyte
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 10th Sep 2003 11:34
I'm not sure your GFX card can run it. I see some PS 1.4 and 2.0 in there and the Geforce4 series doesn't support those two.
Chenak
23
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 10th Sep 2003 19:10
It does cos it contains 3 different techniques, my card can support the first one which has vs 1.1 and ps 1.1 shaders. And as i've said, the fx file works fine with the example program it came with. I'll post a link when i find it.

Once you start down the Dark Path, forever will it dominate your destiny...
Chenak
23
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 10th Sep 2003 19:13
Here's the link, there's an example program with source on it somewhere.

http://personal.telefonica.terra.es/web/codegarrofi/perPixelLighting/perPixelLighting.htm

Once you start down the Dark Path, forever will it dominate your destiny...
Neophyte
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 11th Sep 2003 07:41
Well I dled the source and everything but I have no idea what the file format for the head is. How did you load it? What converter did you use?
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 11th Sep 2003 07:58
Hmmm... there is a strange problem that happened to me before as well. I don't know whether this is related your problem.

After I completed my FX file, it loaded perfectly on my computer. But when I try to run it on my friend's computer, nothing showed up! A total blank! Initially I thought it is the shader problem. But eventually, after tracing the code for 1.5 hour, I basically concluded that the model didn't get displayed afterall.

It really stumped me! My friend's graphics card was a GeForce 3, and mine is a GeForce 4 TI4200. I don't know whether this is a bug in DBpro or not. Even it is, I don't really know how to report it. As you know, it works fine on my PC (and even some other PC). But the object just won't showed up in my friend's GeForce 3.

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
Chenak
23
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 11th Sep 2003 18:59
@Neophyte: i didnt use the head i just used a 3dmesh i got from somewhere.

@Bulleyes : Yere its annoying ain't it . Maybe its something to do with the GF3? You could post the shader up here and i can try it if you want. What does it do?

Once you start down the Dark Path, forever will it dominate your destiny...
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 11th Sep 2003 20:29
It's a Bump + Spec map effect. I think you had seen my posting before. Anyway, it is at:

http://developer.thegamecreators.com/?m=forum_view&t=16371&b=1

Tell me if there is any errors.

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
Chenak
23
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 12th Sep 2003 01:03
I've tried it and it seems that the object disappears if the camera is between a particular angle. Thats really strange...

I would test it further but i've got a bad virus on my comp. Its that jeefo virus and nearly every single exe file on the computer has been infected (over 1034!) so i may be gone for a while before i can test it out.

*Sigh* i hate viruses.

bye

Once you start down the Dark Path, forever will it dominate your destiny...
Neophyte
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 12th Sep 2003 02:06
@Inferno

"i didnt use the head i just used a 3dmesh i got from somewhere."

Then that would be your problem. From what I've learned from the source file he's precalculated the normals and the diffuse values into textures. You need those textures in order for the shader to run. I believe they are named "normals" and "difuse" and came with the source.

Login to post a reply

Server time is: 2026-07-23 15:48:53
Your offset time is: 2026-07-23 15:48:53