Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8999393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:10:28+00:00 2026-06-16T00:10:28+00:00

I recently implemented a linear sampled gaussian blur based on this article: Linear Sampled

  • 0

I recently implemented a linear sampled gaussian blur based on this article: Linear Sampled Gaussian Blur

It generally came out well, however it appears there is slight aliasing on text and thinner collections of pixels. I’m pretty stumped as to what is causing this, is it an issue with my shader or weight calculations or is it an inherit draw back of using this method?

I’d like to add that I don’t run into this issue when I sample each pixel regularly instead of using bilinear filtering.

Any insights are much appreciated. Here’s a code sample of how I work out my weights:

int support = int(sigma * 3.0f);

float total = 0.0f;

weights.push_back(exp(-(0*0)/(2*sigma*sigma))/(sqrt(2*constants::pi)*sigma));
total += weights.back();

offsets.push_back(0);

for (int i = 1; i <= support; i++)
{
  float w1 = exp(-(i*i)/(2*sigma*sigma))/(sqrt(2*constants::pi)*sigma);
  float w2 = exp(-((i+1)*(i+1))/(2*sigma*sigma))/(sqrt(2*constants::pi)*sigma);
  
  weights.push_back(w1 + w2);
  total += 2.0f * weights[i];
  
  offsets.push_back((i * w1 + (i + 1) * w2) / weights[i]);
}

for (int i = 0; i < support; i++)
{
  weights[i] /= total;
}

And here is the fragment shader (there is another vertical version of this shader too):

 void main()
 {
  vec3 acc = texture2D(tex_object, v_tex_coord.st).rgb*weights[0];
  for (int i = 1; i < NUM_SAMPLES; i++)
  {
    acc += texture2D(tex_object, (v_tex_coord.st+(vec2(offsets[i], 0.0)/tex_size))).rgb*weights[i];
    acc += texture2D(tex_object, (v_tex_coord.st-(vec2(offsets[i], 0.0)/tex_size))).rgb*weights[i];
  }
  gl_FragColor = vec4(acc, 1.0);

Here is a screenshot depicting the issue:

Linear Sample Gaussian Blur Issue

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:10:29+00:00Added an answer on June 16, 2026 at 12:10 am

    This is an inherent issue with the bilinear filtering. It’s unavoidable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have recently implemented htmlpurifier in our web-based application. Earlier we used to have
I've recently implemented some vectored exception handling to catch errors in our software. This
I have recently implemented Django's excellent cache framework. However from what I understand Django
I recently came across this question What is the BEST-WORST case time to add
I recently implemented password reset on AD using python ldap module. This involved passing
I recently implemented pull to refresh here: https://github.com/leah/PullToRefresh . It kind of works however
I am using docmail's Simple API for sending Postcard.They have implemented this functionality recently,
I've recently begun using MathNet to implement our linear algebra, however I'm having some
I recently implemented a solution to take an SSIS package and reconfigure the connection
I have recently implemented an Action that toggles the enabled status of a business

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.