Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SSAO is inverted - light instead of shadows
Asthanius Offline
Junior Member

Posts: 1
Threads: 1
Joined: Oct 2019
Reputation: 0
SSAO is inverted - light instead of shadows

I'm working in HPL3 and noticed that I get very strange lighting around the edges of certain objects in-game, which disappears when I turn SSAO off in the options. This obviously means the SSAO isn't working correctly, but I have no idea why.

This even causes things like, when I move a door, there's a band of light on the edge that moves with the door.

It's easiest to see the issue around the mirrors and in the corner on the left, where there's strange lighting that shouldn't exist.

I had someone much more knowledgeable in code take a look at shadersource.hpss, and they said the math for computing SSAO looks correct, so maybe it has to do with when it's applied?

Does anyone know how I can solve this issue?

[Image: Kox7Sjs.png]

NOTE: I've also attached my hpl.log, which does seem to mention SSAO errors.


Okay, so I found the .hpsl shader files and tried reversing some of the results (e.g. changing specific instances of "+" to "-", or "*" to "/"), which partially fixed the issue. Those lights I saw before disappeared, but now they're appearing where there used to be proper shadow.

[Image: z5tETGA.png]
[Image: 184LCj5.png]

Attached Files
.log   hpl.log (Size: 63.94 KB / Downloads: 156)
(This post was last modified: 10-03-2019, 08:46 PM by Asthanius.)
10-03-2019, 07:41 PM
Darkfire Offline
Senior Member

Posts: 371
Threads: 22
Joined: May 2014
Reputation: 15
RE: SSAO is inverted - light instead of shadows

Sounds like you reversed the shadow-shading script to make them lighter instead of darker. I don't think this is the way to go.

This might have something to do with the way you light those levels, because you seem to use a one intensive BoxLight or smth similar. This probably won't be a problem when you apply usual lighting techniques.

PS. You'd probably better come to the official Discord with this:

10-03-2019, 10:57 PM

Users browsing this thread: 1 Guest(s)