Shadow Mapping in Source

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

Re: Shadow Mapping in Source

Postby Gamerman12 on Fri Jun 08, 2012 5:24 am

Could you inquire a little bit more on that? I've tried some solutions, mostly relating to the renderparam's in popgbuffer, popcomposite, etc. but this is what happened...
Image
Image
Gamerman12
Dumpling
Dumpling
 
Joined: Thu May 31, 2012 11:20 pm

Re: Shadow Mapping in Source

Postby joe_dirt976 on Sat Jun 09, 2012 3:03 pm

so is there anyway to make this into an additive shader to lightmapping? (IE projected texture style)The shadows and lighting are great, but the ambient lighting has no occlusion. I simply ask because i know very little of how this works and am still trying to figure it out. Also, wouldn't it be cheaper budget wise to use the 2 methods of lighting interchangeably? I mean using env_light for pure ambient lighting and light_spots where a deferred light would simply be unnecessary.
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 -=Biohazard=- on Sat Jun 09, 2012 4:33 pm

Gamerman12, did you also replicate the stuff in pushgbuffer for the gbuffer, because it apparently draws the gbuffer output to your backbuffer.

joe_dirt976, you would rather add the lightmapping back to the composite pass (like mentioned some pages earlier), it doesn't really make sense the other way around I guess. The highest additional performance cost is simply the re-rendering of the scene, but that can't be omitted because that's just how deferred lighting works.
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Shadow Mapping in Source

Postby -=Biohazard=- on Tue Jun 12, 2012 9:39 am

The viewmodel stuff should be working now:

Image

I didn't update the build yet, but you merely have to get my new viewrender_deferred.cpp for your own mod.
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Shadow Mapping in Source

Postby Jordash on Tue Jun 12, 2012 12:09 pm

Oh man, those view model shadows. You sly dog, you.
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 ScarT on Tue Jun 12, 2012 8:51 pm

EDIT: Oh okay, nevermind. It didn't copy over the file the first time it seems. Everything is fine and dandy now

Whenever I compile maps with the new light entities I get this in the compile log (VRAD spews it).

Code: Select all
unsupported light entity: "light_deferred_global"
unsupported light entity: "light_deferred"
unsupported light entity: "light_deferred"
unsupported light entity: "light_deferred"


What glaringly obvious thing did I miss?
User avatar
ScarT
Senior Member
Senior Member
 
Joined: Sat Apr 02, 2005 7:33 pm
Location: Denmarkian Land

Re: Shadow Mapping in Source

Postby -=Biohazard=- on Tue Jun 12, 2012 9:47 pm

ScarT wrote:What glaringly obvious thing did I miss?


Nothing, VRAD is just dumb and goes like:

'If entity name begins with light_ try to do light stuff and complain for no reason if entity is actually unknown after all'
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Shadow Mapping in Source

Postby Botolf on Wed Jun 13, 2012 9:08 am

So how involved would it be to implement this into a Source 2007 mod, assuming the person handling the code is by no stretch of the imagination a coder? Myself, to be precise, though I don't ask from the position of complete ignorance (ie I have 2007 Base code, the compiler, as well as knowing how to distribute coded changes with the mod). Thus far I've just implemented a lot of community code fixes from the VDC wiki and the like, and I've no qualms with asking for pointers and numerous stupid questions. In any case, my mod is sufficiently a ways off to accommodate a lot of broken eggs in the process (doubtful anything of it will be seen before year's end, and that's being optimistic). I realize I'm hypothesizing on a Frankenstein's baby here, but no harm in asking!
User avatar
Botolf
Regular
Regular
 
Joined: Sat Jan 16, 2010 7:38 am

Re: Shadow Mapping in Source

Postby Gary on Wed Jun 13, 2012 3:19 pm

Yeah, for a non-coder, this wouldn't be easy to port. Though, I don't know how easy it would be for a good coder... Since I'm in between the two skill levels.
Have a question related to modding or something I posted? Something that needs staff attention? 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 -=Biohazard=- on Wed Jun 13, 2012 3:38 pm

I know about a few people who tried it and gave up really fast, maybe because they have been spammed with errors after copy and pasting it...

Like Gary said, non-coders would probably have trouble with this - you need to understand the compiler errors you'd get if you want to fix them.

But anyway, this should be super simple to port imho. Especially considering that the materialsystem is based on the 2007 one. If that wasn't the case, there'd be a high potential for a lot of shader work to do...

Regarding the shader stuff, take the vanilla shaderlib.lib from 2007 and the keep the rest. Any compile errors should be simple to fix. For the client/server you can keep all the files and simply fix any occuring errors except for viewrender_deferred.cpp. That file is entirely different and it would make more sense to take the 2007 viewrender file and re-implement the deferred stuff, diff viewrender_deferred with the swarm viewrender file to do so efficiently.
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Shadow Mapping in Source

Postby ScarT on Wed Jun 13, 2012 4:19 pm

I'm getting some really odd effects using this. The shadows are terrible.

Image
Image
Image


Especially the fog acts up.
User avatar
ScarT
Senior Member
Senior Member
 
Joined: Sat Apr 02, 2005 7:33 pm
Location: Denmarkian Land

Re: Shadow Mapping in Source

Postby -=Biohazard=- on Wed Jun 13, 2012 5:04 pm

ScarT wrote:I'm getting some really odd effects using this. The shadows are terrible.
Especially the fog acts up.


Care to give some more information? Because something is apparently broken.

It would especially be interesting to know if my build works on your hardware or not, make sure to grab the newest one...
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Shadow Mapping in Source

Postby levan563 on Wed Jun 13, 2012 6:17 pm

Hey,Face Animation is crashed the game.
Models with face animation just need recompiled?
The Revenge Leader
User avatar
levan563
Dumpling
Dumpling
 
Joined: Wed May 23, 2012 5:15 pm
Location: USA

Re: Shadow Mapping in Source

Postby -=Biohazard=- on Wed Jun 13, 2012 6:31 pm

levan563 wrote:Hey,Face Animation is crashed the game.
Models with face animation just need recompiled?


Which model have you been using? Does it work with the normal renderer?

The morph stuff is taken from 2007, it might just not be compatible like that. Run in debug mode to figure out where it crashes.
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Shadow Mapping in Source

Postby ScarT on Wed Jun 13, 2012 7:53 pm

Turns out I forgot to merge over some stuff in the materialsystem folder, and that caused that bug. Your build was fine, but your test map in my build was having the bug too. All fixed now :)

It works just fine on my hardware. I'm putting together a benchmark sometime soon to see how well it runs on various hardware.
User avatar
ScarT
Senior Member
Senior Member
 
Joined: Sat Apr 02, 2005 7:33 pm
Location: Denmarkian Land
PreviousNext

Return to Programming

Who is online

Users browsing this forum: No registered users