about vertex based bokeh??

share shaders here
Post Reply
  • Author
  • Message
Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

about vertex based bokeh??

Can vertex based bokeh be done in the .fx files?

I've read a lot of articles trying to figure out how to do that.
I found a blog saying:
this new technique uses the vertex shader to generate bokeh sprites/billboards, the steps to do this is:
* create big vertex shader containing 4 vertices per pixel!, yes you are reading it correct, 4 vertices per pixel...
* inside vs, you generate the quad vertices based on some math, this math will actually use some circle of confusion values and your current image, so you can set bokeh color and size.
* inside ps, you just sample your bokeh texture, can be any shape you like, and use the color you output from the vs, to set its intensity etc.
How do I create vertex shader containing 4 vertice per pixel??

the site:http://orenk2k.blogspot.tw/2012/04/anot ... nique.html
_________________
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: 17444
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: about vertex based bokeh??

First, you can't do this. Second, it's for perverts, this method don't have any future by quality and performance.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7
Post Reply