About Histogram

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

About Histogram

Hi everyone, here is my naive approach for histogram.

1. copy 1/16 size greyscale texture + 64 step brightpass to 4 x 4 x RGBA
2. return 1 if pixel color > 0
3. average each texture, get percentage of how many points have pass the threshold.

result of 2.
Image

so the problem is about step 3. How do I get the average, downscale? blur?

I'm still trying another approach, which requires "renders one point primitive for each input pixel"
Not sure how to do that. Here is the original paper
_________________
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: 530
Joined: 30 Jan 2012, 13:18

Re: About Histogram

I use a hacky solution to downscale something by putting the R G and B channels on different screenspace areas on the alpha channel. Used it for some kidn of LDR bloom on old ENB versions which didn't have enbloom.fx.
Post Reply