I'm going to raise an issue for this on the bug tracker, but I'm going to link to this thread because it's easier for me to post pictures here and to order my thoughts.
[edit] Done: https://mantis.zdoom.org/view.php?id=607 [/edit]
Sometime between version 2.2.0 and 2.3.2 something happened to decals to make them darker if they use a sprite as part of their decal. The plasma scorch shows it reasonably well:
2.2.0
The only grey bit is the parts of the underlying scorch that can be seen poking out from behind the fading blue sprite.
2.3.2 (and later, right up to the 3.0 pre versions)
There is an obvious dark grey edge to the decal around the edge of the blue sprite graphic
In my Burghead mod, it's even more obvious because I used sprites with quite large but very faint borders.
2.2.0
2.3.2+
Once the sprite part of the decal fades, the bit left behind looks fine.
Decals darker
Moderator: GZDoom Developers
Forum rules
Contrary to popular belief, we are not all-knowing-all-seeing magical beings!
If you want help you're going to have to provide lots of info. Like what is your hardware, what is your operating system, what version of GZDoom/LZDoom/whatever you're using, what mods you're loading, how you're loading it, what you've already tried for fixing the problem, and anything else that is even remotely relevant to the problem.
We can't magically figure out what it is if you're going to be vague, and if we feel like you're just wasting our time with guessing games we will act like that's what you're really doing and won't help you.
Contrary to popular belief, we are not all-knowing-all-seeing magical beings!
If you want help you're going to have to provide lots of info. Like what is your hardware, what is your operating system, what version of GZDoom/LZDoom/whatever you're using, what mods you're loading, how you're loading it, what you've already tried for fixing the problem, and anything else that is even remotely relevant to the problem.
We can't magically figure out what it is if you're going to be vague, and if we feel like you're just wasting our time with guessing games we will act like that's what you're really doing and won't help you.
-
- Lead GZDoom+Raze Developer
- Posts: 49130
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Decals darker
This looks like their render style changed from additive to translucent.
-
-
- Posts: 26540
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: Decals darker
If anyone else has been following this and trying to replicate the problem, I have found out that it only happens when Ambient Occlusion is active.
-
-
- Posts: 3109
- Joined: Sat May 28, 2016 1:01 pm
Re: Decals darker
Here's a screenshot of what's going wrong:
The sprite normals are being written into the normal gbuffer - the plasma shots and the vial shouldn't be visible on this screenshot. It probably shouldn't write normal data for transparent stuff, just like it doesn't write depth data.
Edit: Hmm, weird. That can't explain it as the SSAO pass runs BEFORE the sprites are drawn. The plot thickens..
The sprite normals are being written into the normal gbuffer - the plasma shots and the vial shouldn't be visible on this screenshot. It probably shouldn't write normal data for transparent stuff, just like it doesn't write depth data.
Edit: Hmm, weird. That can't explain it as the SSAO pass runs BEFORE the sprites are drawn. The plot thickens..
-
- Lead GZDoom+Raze Developer
- Posts: 49130
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Decals darker
Decals are not sprites. They are drawn as the last pass of solid geometry, so they either shouldn't write normals or get one from the underlying line.
-
-
- Posts: 17454
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: Decals darker
dpJudas - off topic but how do you make the scene show those funky bright colours? :D Been meaning to ask since that model normal thread... :V
-
-
- Posts: 3109
- Joined: Sat May 28, 2016 1:01 pm
Re: Decals darker
If they are drawn last, then that's actually good news. Makes it easier to make them stop outputting depth and normal data.Graf Zahl wrote:Decals are not sprites. They are drawn as the last pass of solid geometry, so they either shouldn't write normals or get one from the underlying line.
At the moment I cheat. In main.fp I change the last part of the shader to look like this:Nash wrote:dpJudas - off topic but how do you make the scene show those funky bright colours? Been meaning to ask since that model normal thread... :V
Code: Select all
FragColor = frag;
#ifdef GBUFFER_PASS
FragFog = vec4(AmbientOcclusionColor(), 1.0);
FragNormal = vec4(vEyeNormal.xyz * 0.5 + 0.5, 1.0);
FragColor = FragNormal; // <---- this line creates the funky colors
#endif
What I really need is to improve the debugging part of the GL renderer so I can pick any given point in the rendering process and copy that particular buffer to be shown. In this particular case I'm interested in knowing how the depth and normal buffers look like exactly between the opaque and translucent passes, because that's the data that the SSAO pass is working with.
-
-
- Posts: 17454
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: Decals darker
Ahh okay. I thought it was a Cvar. It most definitely won't mean anything to me since I don't know anything about graphics programming, so nevermind. :D Still looks cool though! I guess you are talking about "filtering" a particular pass of a scene, as seen in those blogs that break down the rendering in GTA 5/Doom 4 etc.
-
-
- Posts: 3109
- Joined: Sat May 28, 2016 1:01 pm
Re: Decals darker
Yes, exactly. Seeing how things look like half-way through helps a lot when trying to debug a shader. Like if you set gl_ssao_debug to 2 then you can see the true output of the SSAO shader. Then after blurring that you get what gl_ssao_debug 1 shows and so forth. I tried adding support for identifying the various passes to RenderDoc, but unfortunately the way GZDoom renders things is too heavy for that debugger. RenderDoc being the tool they used to generate all those screenshots in the blogs you're talking about.