Author Topic: Deferred Lighting and soft shadows  (Read 68635 times)

0 Members and 1 Guest are viewing this topic.

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Deferred Lighting and soft shadows
Well, when they've been black for like a year(13.1 drivers introduced this problem, and IIRC it was fixed in the june 16th nightly) just showing up is good enough.
Whatever Swifty has done here has to be more involved than just sticking a pair of abs() calls into the shader (the fix committed in r10797) for it change the behavior like it does, so making them "just show up" probably took more effort. :P
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 
Re: Deferred Lighting and soft shadows
That's true, but whatever he's done(or tried to do) clearly doesn't fully work. So I think "just showing up" is an appropriate description.
And I really mean no offence, but that's just how it is.
[19:31] <MatthTheGeek> you all high up on your mointain looking down at everyone who doesn't beam everything on insane blindfolded

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Deferred Lighting and soft shadows
I need to clarify that whatever FrikgFeek thinks is a fix is just a result of a couple lines of code that were changed experimentally to ascertain the cause of that rendering bug. It just happened to be accidentally committed into the deferred light and soft shadows branch. So I think whatever discussion about that bug is largely irrelevant when it comes to these builds.

Anyway, I have another build that supposedly fixes trails. I've also adjusted the shadow cascade distances to prevent the fourth cascade from looking like crap.

http://www.mediafire.com/download/6fw8qfrjuel7rqx/shadows_10794_r3.zip

 
Re: Deferred Lighting and soft shadows
Ok, so permatrails work now, but only if I launch the .exe direclty. If I use the launcher(with the same flags) they don't. I have no idea why.
I'll play with it a bit more and try to break it in other ways, don't know if I'll mange to give you any useful info though.
[19:31] <MatthTheGeek> you all high up on your mointain looking down at everyone who doesn't beam everything on insane blindfolded

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Deferred Lighting and soft shadows
Can you tell me which flags you're using again?

 
Re: Deferred Lighting and soft shadows
 -nomotiondebris -missile_lighting -3dshockwave -post_process -soft_particles -fxaa -cache_bitmaps -dualscanlines -targetinfo -orbradar -rearm_timer -ship_choice_3d -3dwarp -warp_flash -snd_preload -fps  -bloom_intensity 70  -ambient_factor 25 -spec_exp 15 -spec_point 1.2 -spec_static 1.7 -spec_tube 1.5 -ogl_spec 50

Trying a few different mods, mostly using MVPs 2014
« Last Edit: June 29, 2014, 03:51:48 am by FrikgFeek »
[19:31] <MatthTheGeek> you all high up on your mointain looking down at everyone who doesn't beam everything on insane blindfolded

 

Offline Nemesis6

  • 28
  • Tongs
Re: Deferred Lighting and soft shadows
I've spotted a bug that's not present in the other shadow/graphics builds - In the last mission of Vassago's Dirge, when you get to the airlock, the game will freeze seconds after
Spoiler:
the ambush
.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Deferred Lighting and soft shadows
Can you describe the freeze? Are you stuck on a white screen?

 

Offline fightermedic

  • 29
  • quite a nice guy, no really, i am
Re: Deferred Lighting and soft shadows
using the latest build, the trails are still flickering, but they are better than they had been before
before they would switch between not being drawn at all and massive flickering, now at least they are always drawn, but still constantly flicker
>>Fully functional cockpits for Freespace<<
>>Ships created by me<<
Campaigns revised/voice-acted by me:
Lightning Marshal 1-4, The Regulus Campaign, Operation: Savior, Operation: Crucible, Titan Rebellion, Fall of Epsilon Pegasi 1.1Aftermath 2.1,
Pandora's Box 2.2, Deep Blood

Other Campaigns I have participated in:
The Antagonist, Warzone, Phantoms & Echo-Gate

All the stuff I release is free to use or change in any way for everybody who likes to do so; take whatever you need

 

Offline fightermedic

  • 29
  • quite a nice guy, no really, i am
Re: Deferred Lighting and soft shadows
one other thing: in missions with 512 asteroids i get crashes, seems like the build doen't support that man objects in a mission
>>Fully functional cockpits for Freespace<<
>>Ships created by me<<
Campaigns revised/voice-acted by me:
Lightning Marshal 1-4, The Regulus Campaign, Operation: Savior, Operation: Crucible, Titan Rebellion, Fall of Epsilon Pegasi 1.1Aftermath 2.1,
Pandora's Box 2.2, Deep Blood

Other Campaigns I have participated in:
The Antagonist, Warzone, Phantoms & Echo-Gate

All the stuff I release is free to use or change in any way for everybody who likes to do so; take whatever you need

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Deferred Lighting and soft shadows
What missions and in what campaigns are you playing?

 

Offline Nemesis6

  • 28
  • Tongs
Re: Deferred Lighting and soft shadows
Can you describe the freeze? Are you stuck on a white screen?

That's weird - When I tried the mission again after having finished it with the BP build, both builds a now stuck on that white screen when I try to play the end mission again through the tech room. When it wasn't doing this, it would manifest as the game just stopping; Windows reporting that the application has stopped responding. Can't say much else unfortunately.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Deferred Lighting and soft shadows
Isn't that the load screen for the next mission?

 

Offline fightermedic

  • 29
  • quite a nice guy, no really, i am
Re: Deferred Lighting and soft shadows
What missions and in what campaigns are you playing?
my own test missions, works with something like 200 asteroids, crashes with 500
>>Fully functional cockpits for Freespace<<
>>Ships created by me<<
Campaigns revised/voice-acted by me:
Lightning Marshal 1-4, The Regulus Campaign, Operation: Savior, Operation: Crucible, Titan Rebellion, Fall of Epsilon Pegasi 1.1Aftermath 2.1,
Pandora's Box 2.2, Deep Blood

Other Campaigns I have participated in:
The Antagonist, Warzone, Phantoms & Echo-Gate

All the stuff I release is free to use or change in any way for everybody who likes to do so; take whatever you need

 

Offline Echelon9

  • Moderator
  • 210
Re: Deferred Lighting and soft shadows
This is possibly an engine limitation, once settled it should be added and a cleanup done to http://www.hard-light.net/wiki/index.php/Engine_limitations

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Deferred Lighting and soft shadows
From asteroid.h:
Code: [Select]
#define MAX_ASTEROIDS 512

I think his point is that the mission does not crash a regular FSO build... but correct me if I'm wrong.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline fightermedic

  • 29
  • quite a nice guy, no really, i am
Re: Deferred Lighting and soft shadows
that's the point exactly
btw, another bug i think: i can't see any jump nodes
>>Fully functional cockpits for Freespace<<
>>Ships created by me<<
Campaigns revised/voice-acted by me:
Lightning Marshal 1-4, The Regulus Campaign, Operation: Savior, Operation: Crucible, Titan Rebellion, Fall of Epsilon Pegasi 1.1Aftermath 2.1,
Pandora's Box 2.2, Deep Blood

Other Campaigns I have participated in:
The Antagonist, Warzone, Phantoms & Echo-Gate

All the stuff I release is free to use or change in any way for everybody who likes to do so; take whatever you need

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Deferred Lighting and soft shadows
It would help a lot if you can get me a log file of the crash with the asteroids. A mission file that replicates the conditions of your crash would help but I think a log file will still go a long way.

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: Deferred Lighting and soft shadows
Would there be any chance of getting a patch for merging the shadows code into my branch (which is only in SVN)? It certainly doesn't seem very straightforward, but on the other hand you'd get a lot of testing from FotG that way. :D

 
Re: Deferred Lighting and soft shadows
Yes please - we're VERY eager to get your shadows into FOTG.  It'll make a world of difference.