Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 10:32
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip, Quad), 604 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 4 1 2 3 4
real Depth of Field Shader for A6 Com/Pro #123322
04/12/07 13:10
04/12/07 13:10
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline OP
User
BoH_Havoc  Offline OP
User

Joined: Jun 2004
Posts: 655
to your left
Alright here it is (finally ^^): A real Depth of Field shader for A6 Com/Pro

First some screens to show what it does:











---------> get it HERE <---------

This shader needs shader model 2. There also is a shader model 3 version included with 4 more taps resulting in a smoother look.
Check test.wdl for more information and a step-by-step tutorial on how to use this shader.

Specials thanks to:
ello: for writing somewhere on the forums how to get the depth of a model through a vertex shader!
xXxGuitar511: for helping me out with my view-dependent-material-change-script-thingy!


Hope you like it!


Shade-C EVO Lite-C Shader Framework
Re: real Depth of Field Shader for A6 Com/Pro [Re: BoH_Havoc] #123323
04/12/07 14:01
04/12/07 14:01
Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
Drew Offline
Serious User
Drew  Offline
Serious User

Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
Can't wait to try it tonight! THANK YOU! I almost switched engines to get DOF...you rock


Drew Medina
Game Developer (Artist)
Personal & professional website
Deviant Art
My Blogspot
Re: real Depth of Field Shader for A6 Com/Pro [Re: Drew] #123324
04/12/07 15:29
04/12/07 15:29
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
This is indeed a nice contribution !!
I always liked DOF but to get a good result out of it, I have searched for quite a long time... untill today

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: real Depth of Field Shader for A6 Com/Pro [Re: frazzle] #123325
04/12/07 16:18
04/12/07 16:18
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
I'll check it out later, but I already download it!

I've got to check it out and see how you did it


xXxGuitar511
- Programmer
Re: real Depth of Field Shader for A6 Com/Pro [Re: xXxGuitar511] #123326
04/12/07 16:36
04/12/07 16:36
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
Wow, very great one! If you are able to get the deph data in an shader, it should be possible to write also an softshadow shader, or?

Re: real Depth of Field Shader for A6 Com/Pro [Re: TWO] #123327
04/12/07 16:50
04/12/07 16:50
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
I was thinking of that as well, but I have no idea how to realize such a concept...


xXxGuitar511
- Programmer
Re: real Depth of Field Shader for A6 Com/Pro [Re: xXxGuitar511] #123328
04/12/07 17:43
04/12/07 17:43
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline OP
User
BoH_Havoc  Offline OP
User

Joined: Jun 2004
Posts: 655
to your left
i don't think that this will work. Have a look at the depth output:




nothing here to archive softshadows, as far as i can tell.
However while creating the DoF shader i thought about another method to create softshadows. The idea is to change the shadow color to a color never used in game. An extreme green, blue or pink and then read this color out in a shader, blur it, blacken it and render it on top of the scene. Not really a clean method, but might work...well we'll see ^^


Shade-C EVO Lite-C Shader Framework
Re: real Depth of Field Shader for A6 Com/Pro [Re: BoH_Havoc] #123329
04/12/07 18:44
04/12/07 18:44
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Is there any way to apply a shader to the shadow material?

mat_shadow.alpha = 50;

Could you not use this same pointer to apply a shader? The answer is yes, but could you do anythign with a shader from there?


xXxGuitar511
- Programmer
Re: real Depth of Field Shader for A6 Com/Pro [Re: xXxGuitar511] #123330
04/12/07 19:40
04/12/07 19:40
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline
Expert
Excessus  Offline
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
Looks great, thanks for contributing!

Rendering the depth is the easy part of shadowmapping. If you want to do this you should render the depth from the lights position and then project it over the scene so you can compare the distance of the pixel to the distance stored in the depth map to determine if it's shadowed. I have a working demo of this in A6, but it looks kinda crappy and I don't have time to finish it atm..

Re: real Depth of Field Shader for A6 Com/Pro [Re: Excessus] #123331
04/13/07 03:59
04/13/07 03:59
Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
Drew Offline
Serious User
Drew  Offline
Serious User

Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
This shader officially kicks *ss!
I love it, took me sometime to realize that you had to set an object to action e diff...maybe because I was so psyched to have it I missed it THANK YOU SO MUCH!


Drew Medina
Game Developer (Artist)
Personal & professional website
Deviant Art
My Blogspot
Page 1 of 4 1 2 3 4

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1