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

0 Members and 1 Guest are viewing this topic.

Re: Deferred Lighting and soft shadows
Huh. Maybe it's just more noticeable because of the uncontrollable bloom. Used to have it at 55, now it's either full or off.
[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
Because this stuff is experimental and wasn't intended for public consumption yet, the bloom controls don't do anything right now. That's why you can't control the intensity.

 
Re: Deferred Lighting and soft shadows
Yes, I know, I was told so already. I'm not saying it's a bug, just that it made me notice a bug that I just happened to miss in trunk and I mistakenly assumed it was a bug with these builds.
Like I said, sorry if this is nothing new and I'm giving you useless feedback.
[19:31] <MatthTheGeek> you all high up on your mointain looking down at everyone who doesn't beam everything on insane blindfolded

 
Re: Deferred Lighting and soft shadows
Incidentally it looks like you haven't committed the other two cross-platform fixes, so I guess I should remind you about that.
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.

  

Offline The Dagger

  • 29
  • I like zod ships
Re: Deferred Lighting and soft shadows
I love the way these builds are making ma freespace look and I'm forever grateful for your work.
However, I did find some odd looking stuff when asteroids go boom:

But that's what you get when you use experimental builds I guess.
Anyway, thanks for your work! :yes:

 

Offline The Dagger

  • 29
  • I like zod ships
Re: Deferred Lighting and soft shadows
Some new bug discovered in the latest builds provided by AdmiralRalwood.

The subspace portal is rendered on top of the background instead of being added and the nodes are black.
If this isn't helpful, please tell me and I'll stop spamming this thread.

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Deferred Lighting and soft shadows
You're using the PBR build. I'm really not addressing any bug reports from that branch yet and am not officially providing builds for it. Please only report bugs from the deferred lighting and shadows branch. The PBR branch is still a WIP. Those bugs you experienced have already been fixed because AdmiralRalwood likely built it while I was in the middle of committing a bunch of stuff.


 

Offline The Dagger

  • 29
  • I like zod ships
Re: Deferred Lighting and soft shadows
Ah, sorry, I apparently got those two mixed.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Deferred Lighting and soft shadows
Ah, sorry, I apparently got those two mixed.
My fault for using the same filenames for deferred builds and PBR builds; my old links in this thread will now lead to PBR builds as a result. Sorry about the confusion; I'll rename them on my server to avoid this sort of mistake in the future.
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 The Dagger

  • 29
  • I like zod ships
Re: Deferred Lighting and soft shadows
Could I get a build for testing then?


EDIT: got a fresh build from MageKing.
Apparently when a shadow is casted from an object receiving a shadow, the casted shadow from the second object presents a halo where the shadow he received would be. Graphical description:



« Last Edit: April 08, 2015, 05:18:37 pm by The Dagger »

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Deferred Lighting and soft shadows
I've known about this bug for a while but I decided not to comment on it until someone raised the issue.

This is probably something that won't be fixed anytime soon. This is a known shortcoming of the shadow mapping technique I use. Variance shadow maps have issues with light leaking. Getting rid of the light leaks would require me switching to something like exponential variance shadow maps. That's probably something I'll do later but that's far down the line.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Deferred Lighting and soft shadows
Okay, fresh set of builds from the shader_transform_deferred branch: AVX and SSE2.
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
Reminder that you still need to add #include <algorithm> to any file in which you use std::sort for this to compile on Linux. Currently the offenders are graphics/2d.cpp and model/modelrender.cpp.
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Deferred Lighting and soft shadows
I'm not sure if this had been reported already; nameplates on ships have a box around them where they should be transparent. This only occurs in the nebula, it doesn't happen in normal space.



(I noticed this when testing the new PBR builds, but it seems to be present in this branch as well)
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Deferred Lighting and soft shadows
Okay, last build before this hits trunk. I fixed some issues involving mission loadout wireframe rendering. I also fixed the nameplate rendering bug in nebula missions.

http://www.mediafire.com/download/86vea6cp9af7rxp/shadows_11296_r3.zip

If no one reports any bugs in the next couple of days, I'm going to merge this into the main repo.

Builds were built off of https://github.com/SamuelCho/Freespace-Open-Swifty/tree/materials

This branch has some additional code that lays the groundwork for a new material-based drawing system I have planned. The shader uniform state handling code has been transitioned to share some of the backend of this new system.
« Last Edit: April 26, 2015, 04:59:23 pm by Swifty »

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Deferred Lighting and soft shadows
I saw a lot of black streaking sliding along the hulls of capital ships in massive battle, when you get closer to them.  This was on a build from your branch on OS X 10.8.

Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Deferred Lighting and soft shadows
from materials or shader_transform_deferred? And what's the GPU of this machine?

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Deferred Lighting and soft shadows
I'll have to rerun to get a log, it's AMD is all I remember now.  It's a late 2011 macbook pro, can't recall what they shipped with.  Should have been the shader_transform_deferred branch with mediavps 2014.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Deferred Lighting and soft shadows
My 2014 Retina Macbook Pro (Like the top of the line Macbook a year ago) with a Geforce GTX 650M chugs when just rendering a single model with shadows enabled. We purposely used the OpenGL EXT geometry shader extension to get shadows working on Mac but after seeing this, it's honestly not worth it.

I'd rather just use the better supported ARB geometry shader extension (Which is not supported on the Mac OpenGL Compatibility profile) and lose shadow support on Mac and later have it supported down the line when we transition to the OpenGL Core profile.
« Last Edit: April 26, 2015, 06:40:37 pm by Swifty »

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Deferred Lighting and soft shadows
As long as we don't regress I don't really care if we have shadows on Mac or not.  And my bad, it's not even AMD...It's Intel HD 3000 512MB.  So that might be part of the problem.  I'll be getting a new one soon, so I really won't care, as I'm guessing it'll work better.  If this helps the push to get Core Profile support on the Mac too, all the better.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays