Page 1 of 1

3D Gif shader

Posted: 08 Aug 2014, 00:52
by number6
So, there are these new "3D gifs" on the interwebs that create some cool optical illusions I think. It was posted about on this site's "Offtopic->Good or Bad" forum by CosmicBlue. Here are some examples:

http://www.tumblr.com/tagged/3d-gifs

I thought it would be a fun experiment to try it in game and simple enough to code so I created a shader for the effect. I added the effect of a white border and the two white vertical lines in the enbbloom.fx shader using the new depth buffer access.
Image

It's an interesting effect. It does make you notice near depth more because of the constant reference plane added. Not that you would want to play the game like this, but it's a cool optical illusion and maybe a tool for screen archers to frame up some shots differently.

I had tried to implement it in the enbeffectprepass.fx, but then the white affects the adaptation and bloom so it worked out much better adding it to the enbbloom.fx post process function. The only downside to adding it in enbbloom.fx is that it seems to be only additive. I haven't looked at the technique part of the file, so maybe the compositing mode can be changed there. This means that only a white color works for full occlusion.

Here's the shader with some annotations to adjust it in game:
http://www.mediafire.com/view/gv7njkw7z ... r_lines.fx

Enjoy your new 3D games!

Thanks for the idea CosmicBlue!

Re: 3D Gif shader

Posted: 16 Sep 2014, 22:21
by kingeric1992
Adapt to effect.txt, with two bars in each direction and border.
Image

Image
TESV.exe_DX9_20140916_215739 by kingeric1992311, on Flickr

Image
TESV.exe_DX9_20140916_213955 by kingeric1992311, on Flickr
Forgot to turn off vanilla DOF :P

Re: 3D Gif shader

Posted: 17 Sep 2014, 00:16
by far327
hmm, its interesting. I'll give it a go :)

thank you for posting!

Re: 3D Gif shader

Posted: 17 Sep 2014, 02:12
by number6
Great images kingeric1992! They really show off both the "3D" effect and how it can be used for some interesting framing. I should have posted something better myself to begin with, but it was done on a whim so I just took some random screenshots :lol: .

Thanks for posting your code. I guess I didn't realize that there was texDepth access in effect.txt, but now that you have done it I see it is the obvious place for this effect. I wonder if you have any other ideas for this type of effect?

Re: 3D Gif shader

Posted: 17 Sep 2014, 09:47
by kingeric1992
Thanks.
Image
always the same bird in the opening sequence....

film with console command "SGTM 0.01"
It will be awesome to have something like a sword slash at the screen or an arrow shooting out, or even combined with focus shifting.