1
Coding tutorials / Re: Handmade Hero - Developing an entire game from scratch in C/C++
« on: July 23, 2016 »
Thanks for posting this project, I never heard of it before. I think I'll enjoy watching this video series.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.



float Histogram[100][100];float Histogram[300][300];


sum += texture2D(RTScene, vec2(vTexCoord.x - 4.0*blurSize, vTexCoord.y)) * 0.05;
sum += texture2D(RTScene, vec2(vTexCoord.x - 3.0*blurSize, vTexCoord.y)) * 0.09;
sum += texture2D(RTScene, vec2(vTexCoord.x - 2.0*blurSize, vTexCoord.y)) * 0.12;
sum += texture2D(RTScene, vec2(vTexCoord.x - blurSize, vTexCoord.y)) * 0.15;
sum += texture2D(RTScene, vec2(vTexCoord.x, vTexCoord.y)) * 0.16;
sum += texture2D(RTScene, vec2(vTexCoord.x + blurSize, vTexCoord.y)) * 0.15;
sum += texture2D(RTScene, vec2(vTexCoord.x + 2.0*blurSize, vTexCoord.y)) * 0.12;
sum += texture2D(RTScene, vec2(vTexCoord.x + 3.0*blurSize, vTexCoord.y)) * 0.09;
sum += texture2D(RTScene, vec2(vTexCoord.x + 4.0*blurSize, vTexCoord.y)) * 0.05;
1. Render the scene you want to blur to a texture (could be downsampled)
2. Render a screen aligned quad with the horizontal blur shader to a texture
3. Render a screen aligned quad with the vertical blur shader to the screen or texture depending on what you want to use it for