3D Gif shader

share shaders here
Post Reply
  • Author
  • Message
Offline
User avatar
*master*
Posts: 229
Joined: 21 Feb 2013, 03:21
Location: Los Angeles, CA

3D Gif shader

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!
_________________
i7-4970K 4.8ghz, 16gb ram, Geforce Titan X 12gb vram, win7

Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

Re: 3D Gif shader

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
Attachments
effect.txt
(5.36 KiB) Downloaded 271 times
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube

Offline
User avatar
*blah-blah-blah maniac*
Posts: 725
Joined: 30 Dec 2011, 22:39

Re: 3D Gif shader

hmm, its interesting. I'll give it a go :)

thank you for posting!
_________________
Image
Image
My pics on Flickr

Offline
User avatar
*master*
Posts: 229
Joined: 21 Feb 2013, 03:21
Location: Los Angeles, CA

Re: 3D Gif shader

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?
_________________
i7-4970K 4.8ghz, 16gb ram, Geforce Titan X 12gb vram, win7

Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

Re: 3D Gif shader

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.
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube
Post Reply