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.

Work in Progress / Wolfenstein 3D - with Shaders

Author
Message
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 31st Oct 2004 05:46
I'm making a Wolf 3D remake and because the resolution is so small (same as the original) I can afford to code some pixel shaders straight into the engine (by writing to the back buffer).

They run fine even on my computer which is complete crap.

So far I just have Depth of Field & Water (I also have simple color ones like negative but I've got no use for them) but I will have Bump Mapping and heat wave and fish eye refraction in a glass sphere.

This blantantly isn't ready for a WIP post but what the hell, lock it if you want - here's some screenshots:



You may need to look quite closely at the water one, it's had to see the shimmer when it's not moving.

Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 31st Oct 2004 10:02
Chris, that looks cool! Just make sure the game works for those people that don't have shader support on their video cards


--[Gang Wars of New Canada]-- ^^^ banner generously designed by TheBigBabou
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 31st Oct 2004 11:53
Yeah, Depth of Field only works on the very latest cards and runs incredibly slowly on any others.


"Computers are useless they can only give you answers."
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 31st Oct 2004 15:57
The depth of field is the most CPU intensive but on this game there's a maximum of about 16000 pixels that can be affected so it's quick enough.

Does anyone know if you can get access to the zbuffer in DBPro? That would be really helpful.

Xander
21
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 31st Oct 2004 16:02
What is depth of field? I don't really have much experience with shaders, sorry.

Xander Moser - Bolt Software - Firewall
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 31st Oct 2004 17:14
It's how much of the screen is in focus.

If you look at the screen shots you can see the object far away are out of focus but the object nearer are in focus.

It makes it look more like a film because film cameras have a short depth of field (things don't have to be that far away to be out of focus)

Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 31st Oct 2004 18:09
How do you make a texture all pixelly with hard edges? At the moment it stretches and blurs it.

Turoid
21
Years of Service
User Offline
Joined: 1st Nov 2003
Location: The Netherlands
Posted: 31st Oct 2004 18:15 Edited at: 31st Oct 2004 18:19
wow that water is awesome!! how did you make that water? with a shader?

[edit]
Quote: "with a shader? "

OOPS... I didn't read your topic title completely sorry ..

Do you need a complete FPS,3rdPS engine ?? Or a collision command libary?? well here it is:
http://forum.thegamecreators.com/?m=forum_view&t=38869&b=6&p=0
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 31st Oct 2004 19:08
It's sort of a shader but it's not a .fx file or anything and you don't need a 3DFx card to have it.

Sam Cameron
20
Years of Service
User Offline
Joined: 26th Dec 2003
Location: 0,0,0 I\'m the center of the world !!!
Posted: 31st Oct 2004 19:17
I was waiting a long time for a DOF effect, I'm very glad with your work, congratulations, can you tell me how can I add DOF in my games in the most easy way please? thank you very much
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 31st Oct 2004 19:52
The way I'm doing it is writing straight to the backbuffer. It would probably be too slow for proper resolutions.

Teh Missingz0rs
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: United Kingdom
Posted: 31st Oct 2004 20:11 Edited at: 31st Oct 2004 20:12
Quote: "It would probably be too slow for proper resolutions."


You don't get proper resolutions any more, like back in the day when I were a lad.

We had proper compooters, then, too.

They were made of wood.

<a href="http://modcamera.mrdictionary.net">MoDCAMeRa</a>
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 31st Oct 2004 21:07
Quote: "How do you make a texture all pixelly with hard edges? At the moment it stretches and blurs it."


load image filename,num,1?

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Mussi
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 31st Oct 2004 21:10
Quote: "Does anyone know if you can get access to the zbuffer in DBPro?"


you can't. Looks nice



Specs: AMD Athlon 1800+, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce4 Ti4400 128mb
Sam Cameron
20
Years of Service
User Offline
Joined: 26th Dec 2003
Location: 0,0,0 I\'m the center of the world !!!
Posted: 31st Oct 2004 21:56
I'm lost and confused , please how can I apply DOF into my programs
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 31st Oct 2004 22:12
You can't, sorry.

Sam Cameron
20
Years of Service
User Offline
Joined: 26th Dec 2003
Location: 0,0,0 I\'m the center of the world !!!
Posted: 1st Nov 2004 01:29
how do you doing so?
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 1st Nov 2004 02:03
I'm copying the backbuffer to a memblock of the same size, then for each pixel I want blurred I'm adding up the values of the memblock three pixels either sides to three variable - rTotal, gTotal, bTotal. Then I'm taking the average and replacing the value in the memblock with the new rgb() value. Then I copy the memblock back to the backbuffer, unlock and sync.

Sam Cameron
20
Years of Service
User Offline
Joined: 26th Dec 2003
Location: 0,0,0 I\'m the center of the world !!!
Posted: 1st Nov 2004 04:52
too much complicated if you say that you have a slow process, I think maybe I'll wait for a shader or something, thanks anyway.
FoxBlitzz
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location: United States
Posted: 1st Nov 2004 08:17
I think you should:

1. Make the game run full-screen

2. Allow the screen resolution to be switchable

3. Remove the ugly pink background as it doesn't contrast well with the rest of the scene.

However, it is looking very nice. I would like to see a tech-demo of this soon.

HP Pavilion | Intel Pentium 4 CPU 2.40 GHz
512 MB Ram | NVIDIA GeForceFX 5600 AGP, with 256 MB Ram
FoxBlitzz
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location: United States
Posted: 6th Nov 2004 12:46
I know this post is a bit old, but I'd like to ask, where did you get those shaders? I don't think people are sheding enough light on the shader support of DBPro and it would be nice if you could tell us where you got those.

HP Pavilion | Intel Pentium 4 CPU 2.40 GHz
512 MB Ram | NVIDIA GeForceFX 5600 AGP, with 256 MB Ram
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 6th Nov 2004 21:38
I just coded them myself.

My vid card doesn't support shaders.
Spiffty50
20
Years of Service
User Offline
Joined: 8th Apr 2004
Location: UK
Posted: 6th Nov 2004 23:40 Edited at: 6th Nov 2004 23:49
I can't see the screenshots, which is really mean. I hate the idea of the game anyways. So there. PPPPPTHHH!

WHOOOOOOOOOOOPEEEEEEEEEEEE!!!

Look to the right. Trust me, it's Calvin and Hobbes.
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 7th Nov 2004 01:35
Why do you hate the idea?

You can get really nice looking graphics on a crap computer.
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 7th Nov 2004 03:47
Yeah.

I dropped this project.

It was fun coding the shaders and learning about memblocks but I can be bothered to remake Wolf 3D.
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 7th Nov 2004 06:36
Thats a shame though - it was looking interesting.

What do you mean, bears aren't supposed to wear hats and a tie? P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home

Login to post a reply

Server time is: 2024-11-16 19:13:58
Your offset time is: 2024-11-16 19:13:58