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.

3 Dimensional Chat / shaders

Author
Message
Chenak
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 16th Apr 2003 18:43
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndrive/html/directx02192001.asp

The site above does help quite a bit for anyone who wants to program shaders for DB.

Now, the problem... Has anyone got any idea how to program a "mesh ultra smooth" shader? Its a shader that draws smoothing effects from textures and is used in Doom 3 to make those cool smooth effects and make the game look really realistic.

Cheers
Once you start down the Dark Path, forever will it dominate your destiny...
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 16th Apr 2003 18:52
lol... all you need to do is use a Vertex Shader that just normalises the vectors, dot product them against the light and then normalise again

works quite nicely - and doesn't take the power of a phong shader hehee

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
Chenak
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 17th Apr 2003 20:32
Raven! Help me I cant get it to work!

heres the vertex shader:



and heres the pixel shader:



Please help I cant get them to work in DBpro, I spent ages trying to get it to work but im not smart enough

Cheers

Once you start down the Dark Path, forever will it dominate your destiny...
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 17th Apr 2003 21:04
If you happen to own the original version of Quake, check this site out. It modifies Quake to use vertex shaders on all BSP maps of the game. http://tenebrae.sourceforge.net
I have found though that some of the levels do have a problem with collision, either way, if you've got the hardware..... This is a must see

There are 10 types of people. Those who understand binary and those who don't
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 18th Apr 2003 06:12
what does that have to do with PVTL Shaders APEX?
and inferno what exactly is the end result you need, you trying to get this to work in DarkBasic Pro?

because you gotta remember the V are the vertex registers (or FVF data layout) so you've gotta set them up as FVF 338 as right now DarkBasic Pro doesn't really support any other types, unless you export them manually as FVF and then load them as a FVF - but i've not done tests to know if that works yet.

where exactly did you get this code from?

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 18th Apr 2003 14:31
Is just that the algorithms used in Tenebrae are similar to the ones that will be used in DOOM III. I downloaded it and tried it with a copy of Quake. The floors, walls etc use bumpmapped reflective surfaces with real time shadowing on all objects etc. Thought it might be of interest to people who were curious.

There are 10 types of people. Those who understand binary and those who don't
Chenak
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 18th Apr 2003 15:12
@APEXnow- That didn't help me, but it was bloody brillant ! Yeah thats the kind of effects i want in my game . Thanks

@Raven- i got it at:
http://personal.telefonica.terra.es/web/codegarrofi/perPixelLighting/perPixelLighting.htm

To be honest, i didn't understand a word of it

The end result should be like in doom3 and tenebrae, it uses a normal map and a color map to create a smooth effect.

Once you start down the Dark Path, forever will it dominate your destiny...
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 18th Apr 2003 15:34
oh your trying to do Per Pixel Lighting
lol oki ... well that guy makes it more overly complicated than it should be, basically all you're doing is taking the current light sources you're then overlaying them onto the FVF model with a set specular colour - we then divide by the diffuse level/colour and finally we then put the shader onto the model again using the lighting source to just add depth.

drives me insane because that guy is using high polygon model which just ruins the whole point in the effect.
they have a good version of this over at MSDN, just do a search for Per Pixel Lighting and you should find it.

i'll see about adding this effect to my currently growing list of Shader Tutorials for DBpro/DirectX/OpenGL ... currently have 2 complete one is Causitics and the other is Volumetric Lighting
both are for a current project, so i'll be sharing them once i've finished the project over the next month or two.

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
Chenak
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 18th Apr 2003 16:08
Thanks Raven
Seems rather complicated but i'll get it in the end, hopefully...

I got the shader from the MSDN site but I cant get it to load. The pixel shader loads fine but the vertex shader just refuses to load.



Cheers

Once you start down the Dark Path, forever will it dominate your destiny...
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 18th Apr 2003 17:21
just a quick check... see how many Vertex Constants you can perform, you'll need more than 16 for it to load
other than that, i'm not sure why it wouldn't

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
Chenak
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 19th Apr 2003 03:50 Edited at: 19th Apr 2003 03:50
vertex constants? how do i implement them? lol me just dumb :-s

cheers

Once you start down the Dark Path, forever will it dominate your destiny...
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 19th Apr 2003 08:17
check maximum vertex constant count() or something like that

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
Chenak
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 19th Apr 2003 15:07
Thanks

Once you start down the Dark Path, forever will it dominate your destiny...

Login to post a reply

Server time is: 2024-04-27 09:54:22
Your offset time is: 2024-04-27 09:54:22