Shadow Mapping in Source

Grab your favourite IDE and tinker with the innards of game engines

Re: Shadow Mapping in Source

Postby Kosire on Tue May 29, 2012 8:48 pm

joe_rogers_11155 wrote:doesn't biohazard work at valve?

Haha no :-D

Shirik wrote:excuse me me but i ehhh - how can i download that?

Use SVN to download the build and source code from the google code page..

http://swarm-deferred.googlecode.com/svn/trunk/
User avatar
Kosire
1337 p0st3r
1337 p0st3r
 
Joined: Sat Mar 07, 2009 7:25 pm
Location: Denmark

Re: Shadow Mapping in Source

Postby Jordash on Wed May 30, 2012 1:49 am

He's finishing uni, but Valve have said the door is open for him when he's done.
User avatar
Jordash
Been Here A While
Been Here A While
 
Joined: Mon Sep 21, 2009 10:36 am
Location: Perth, Australia

Re: Shadow Mapping in Source

Postby joe_dirt976 on Wed May 30, 2012 2:42 am

pure fuckin awesome... I aspire to be this good one day.
Image
Major Banter wrote:Joe Dirt. Also known locally in Interlopers as "Hammer Machine"
User avatar
joe_dirt976
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Sun Nov 18, 2007 10:47 pm
Location: USA

Re: Shadow Mapping in Source

Postby Gary on Wed May 30, 2012 5:21 am

For those with ATI cards, here is a copy of the mod folder(I recompiled the shaders, so it uses the software 5x5 bilinear gaussian method of shadow filtering):
Image

[ Download - 18 MB ]

Edit: Reuploaded. Accidentally released debug.

Note: Sadly, due this being in software and color space, it's slower than it's Nvidia hardware-based counterpart. Not sure by how much... as it's impossible for me to test. EDIT: Actually, might be faster. And this will also be independent of the GPU. So it will work on both NV and ATI cards.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Shadow Mapping in Source

Postby dark0r on Wed May 30, 2012 7:20 am

When I spoke to Biohazard, he said the software filtering was actually faster than hardware. Great work!
dark0r
Been Here A While
Been Here A While
 
Joined: Sat Mar 25, 2006 10:16 am
Location: de_hell

Re: Shadow Mapping in Source

Postby Gary on Wed May 30, 2012 7:28 am

Then why did I have to bother with this at all? If the software method is faster, why not ditch the NV-only method all together?
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Shadow Mapping in Source

Postby dark0r on Wed May 30, 2012 9:02 am

Gary wrote:Then why did I have to bother with this at all? If the software method is faster, why not ditch the NV-only method all together?

I'm not sure, I think the HW filtering can be improved. Also, did you release debug binaries? I'm getting assertions with your release :o
dark0r
Been Here A While
Been Here A While
 
Joined: Sat Mar 25, 2006 10:16 am
Location: de_hell

Re: Shadow Mapping in Source

Postby Ken Chan on Wed May 30, 2012 9:42 am

This is good, but I have some serious problem here.
I installed this to my mod, but this come with some bugs and a huge problem:

1. Missing weapon's view model if this is enabled. The yellow glow is crossbow glow.
Image

2. If the map use old lighting, it's all DARK. Yes, no lighting.
Image

3. This also break some built in effect like DoF's near depth function(far not affected, but it blur the whole view).
Image

Even Steam Cloud's Screenshots is broken, too!
Last edited by Ken Chan on Thu May 31, 2012 4:16 pm, edited 1 time in total.
User avatar
Ken Chan
Regular
Regular
 
Joined: Mon Apr 09, 2012 7:16 pm
Location: Hong Kong

Re: Shadow Mapping in Source

Postby Kosire on Wed May 30, 2012 12:07 pm

Ken Chan wrote:This is good, but I have some serious problem here.
I installed this to my mod, but this come with some bugs and a huge problem:

1. Missing weapon's view model if this is enabled. (Should easy to solve, go valve development community for fix)
The yellow glow is crossbow glow.
Image

2. If the map use old lighting, it's all DARK. Yes, no lighting.
Image

3. This also break some built in effect like DoF's near depth function(far not affected, but it blur the whole view).
Image

Even Steam Cloud's Screenshots is broken, too!


Eh, do you even have Alien Swarm installed?

Do you have an ATI/AMD card?

Do your GPU support Shader Model 3.0?
User avatar
Kosire
1337 p0st3r
1337 p0st3r
 
Joined: Sat Mar 07, 2009 7:25 pm
Location: Denmark

Re: Shadow Mapping in Source

Postby Ken Chan on Wed May 30, 2012 12:21 pm

1. This is alien swarm engine. I ported hl2 to it, ok?
2. I use GTX 560ti, you can see the shadows at viewmodel one.
3. Yes.
User avatar
Ken Chan
Regular
Regular
 
Joined: Mon Apr 09, 2012 7:16 pm
Location: Hong Kong

Re: Shadow Mapping in Source

Postby Legend286 on Wed May 30, 2012 1:07 pm

Ken Chan wrote:This is good, but I have some serious problem here.
I installed this to my mod, but this come with some bugs and a huge problem:

1. Missing weapon's view model if this is enabled. (Should easy to solve, go valve development community for fix)
The yellow glow is crossbow glow.
Image

2. If the map use old lighting, it's all DARK. Yes, no lighting.
Image

3. This also break some built in effect like DoF's near depth function(far not affected, but it blur the whole view).
Image

Even Steam Cloud's Screenshots is broken, too!


You need to add a light_deferred_global to the map because without it there won't be any csm sun shadows.
Legend286
Dumpling
Dumpling
 
Joined: Tue Jul 19, 2011 11:53 pm

Re: Shadow Mapping in Source

Postby Ken Chan on Wed May 30, 2012 1:45 pm

Yeah, and if you enable default lighting with it, it will crash. :/
User avatar
Ken Chan
Regular
Regular
 
Joined: Mon Apr 09, 2012 7:16 pm
Location: Hong Kong

Re: Shadow Mapping in Source

Postby -=Biohazard=- on Wed May 30, 2012 5:17 pm

The hardware filter on amd does probably run faster than the nvidia hw version because it simply works entirely different... I.e. doing 9 samples (for 3x3) on nvidia manually does apparently cause 36 samples to happen internally where some texels are read multiple times, then you'll get a pre-interpolated value back.
On amd you would use one sample, it would again perform 4 samples internally but you'll get all the samples back, without interpolation, which you have to do yourself. So that'd allow better optimization. But that could aswell not be entirely correct, it's just how I understood it...
The software filters require less shader power (on nvidia) but more vram, so in the end you can't tell which one's better because it's dependent from the context.

The viewmodel isn't drawn because there is no call to its drawing function. You probably just have to add two lines of code to draw it once during the gbuffer and one time during composition.

The dof doesn't work because it's not build for this. If you want to make it work again, try writing depth to alpha of the framebuffer yet again.

If it crashes, run in debug, there are heaps of assertions that should make things easier to fix. The pre-build one seemed to work fine regarding the fallback code, since it didn't actually get enabled for so many people at the beginning because of how source assumes new/unknown cards to not support sm3.0.
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Shadow Mapping in Source

Postby Gary on Wed May 30, 2012 5:34 pm

Very interesting Bio. It's too bad I know almost nothing when it comes to shaders, or else I would implement an AMD method.


dark0r wrote:[...]Also, did you release debug binaries? I'm getting assertions with your release :o


Heh... I did. Reuploaded.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Shadow Mapping in Source

Postby Botolf on Wed May 30, 2012 10:23 pm

:o My hat is seriously off to you. The video inspired awe, as did playing around with this on my own machine. I just... wow. You're going to let Valve gobble you up, right? Right?!
User avatar
Botolf
Regular
Regular
 
Joined: Sat Jan 16, 2010 7:38 am
PreviousNext

Return to Programming

Who is online

Users browsing this forum: No registered users