Page 1 of 2

Mirror Mire

Posted: Wed Jan 03, 2018 5:15 pm
by Pixel Eater
MirrorMireLite1.2.pk3
(179.83 KiB) Downloaded 1035 times
Reflective water for GZDoom:

Created with help from GiveOneMoreChance :cheers: Check out their mod's screenshots!
Spoiler: Previous version

Re: Mirror Mire

Posted: Wed Jan 03, 2018 6:46 pm
by Gutawer
Not meaning to be rude, but this really doesn't look right. You can't just flip the screen upside down and sample from that point, on the flipped screen, light doesn't work that way, as can be seen in your second screenshot where the non-reflected cobble wall is way taller than the reflected one - with actual light, both would appear the same height to the player. I think the way screen-space reflection is traditionally done is to raycast based on the point on screen that's being rendered (you need the inverse projection matrix for this) and reflect along the surface normal, stepping the resultant vec3 until it intersects the depth buffer (this is the resultant point). Then, you take the color value based off the depth buffer, and use that as the reflected point. Needless to say, that's vastly more complex than a simple flip down the middle - and even this method has issues when the reflected ray hits off the screen, so to speak, making it impossible to actually sample a value. If you're interested, this looks like a good resource from a quick glance - http://roar11.com/2015/07/screen-space- ... flections/

And, regardless, none of this data is even available currently with the shader system. I think it's a nice idea, but this certainly isn't a particularly great way to do it, not that I can really blame you - more engine support would be needed to fully achieve this.

Re: Mirror Mire

Posted: Wed Jan 03, 2018 7:11 pm
by Pixel Eater
I'm aware it isn't an accurate effect and I have a CPU hungry version in the pipeline that addresses some of that (that's why this one's called Mirror Mire 'Lite'). Consider this an atmospheric effect which you ignore while you play.
And I agree a shader most likely can't be as effective as a hard-coded attempt but people were asking if it could be done this way and I grew curious too :wink:
One thing that could help it look right is if there were a way to remove the bobbing?

Oh here's a preview of the progress for Mirror Mire (Deluxe? :glare: ):
Preview3.jpg
And well, it's not true 3D but it's something.

Re: Mirror Mire v1.1

Posted: Sun Jun 17, 2018 12:45 am
by doomfiend
I love the look of this especially that image with the lava but unfortunately with the latest GZDoom svn it crashes on any map with liquids

Re: Mirror Mire v1.1

Posted: Sun Jun 17, 2018 2:18 am
by Pixel Eater
Sorry Doomfiend, I've toggled around a bunch of graphics settings and I still can't get it to crash. Are they vanilla maps you're trying?

Re: Mirror Mire v1.1

Posted: Sun Jun 17, 2018 9:30 pm
by doomfiend
Vanilla maps indeed, it must have been that particular build of GZDoom i was using as prior to updating it had a hom effect, and updating caused it to crash. what I might do is Go in my ini file and delete the settings I had adjusted,
Spoiler:
Currently the issue I am having
Edit:
Rolled back to the June 07 (x64) and it seems to work again, but theres this odd Blue line on the edges of the walls when I get close, Setting active effect to No / Off will make the entire texture a solid blue / Green? Not sure what thats about lol

Re: Mirror Mire v1.1

Posted: Sun Jun 17, 2018 10:13 pm
by Pixel Eater
Thanks for the bug report, if I understand correctly I was using an integer instead of a floating point number. See if the attached file fixes it?

The bright green when you disable it is normal, it's just the chroma-keying texture. The ability to toggle it was really only for my own testing.

Re: Mirror Mire v1.1

Posted: Mon Jun 18, 2018 8:52 pm
by doomfiend
ah okay, when I meant like the Green texture it would bleed out a bit on the edges, your images do not show this defect. also at the time the liquids would blink especially acid, I'll give this a go on the latest svn and see if it works as intended, thanks for the effort bud

Re: Mirror Mire v1.1

Posted: Mon Jun 18, 2018 9:29 pm
by Pixel Eater
doomfiend wrote:ah okay, when I meant like the Green texture it would bleed out a bit on the edges, your images do not show this defect. also at the time the liquids would blink especially acid, I'll give this a go on the latest svn and see if it works as intended, thanks for the effort bud
The edges bleeding is most likely from having Multisample on, FXAA on low should work better hopefully. I'd like to know more about this blinking if you can though! :?

Re: Mirror Mire v1.1

Posted: Tue Jun 19, 2018 3:25 am
by doomfiend
the blinking was due to a specific build i was using. I used the june 18 build and all issues were resolved with the fix you released.

Re: Mirror Mire v1.1

Posted: Tue Jun 19, 2018 4:06 am
by Pixel Eater
Oh nice! Thanks for the info Doomfiend :)

Re: Mirror Mire v1.1

Posted: Sat Sep 01, 2018 3:08 am
by Xtor98
Doesn't work with GZDoom 3.5.1.
Spoiler:

Re: Mirror Mire v1.1

Posted: Sat Sep 01, 2018 3:22 am
by Pixel Eater
Ah, I never put the fixed version in the OP, sorry about that. Unless that's the one you're using?

Re: Mirror Mire

Posted: Sat Sep 01, 2018 3:44 am
by Enjay
doomfiend wrote:ah okay, when I meant like the Green texture it would bleed out a bit on the edges
You mean this?


That's it with AA on. If I switch it off, I get a very thin green border (1 pixel wide as screen resolution values, not game-world 1 unit) but it's still there.



Sorry that they are jpgs (which blurs the effect a bit too much in the second pic) I couldn't get imgur to accept the full size png screenshots.

Ver 1.1 on 3.5.1 with GTX1080, up to date drivers. [edit] same with 1.2 [/edit]

Re: Mirror Mire

Posted: Sat Sep 01, 2018 3:46 pm
by Pixel Eater
The green border can't be fixed so long as this mod uses chroma keying unfortunately. Turning off some of the advanced graphics settings is the only way to make it work. Unless something like this gets integrated.