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 6768707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:06:22+00:00 2026-05-26T15:06:22+00:00

I set up a basic pixel shader (right now, its configured for testing), and

  • 0

I set up a basic pixel shader (right now, its configured for testing), and it doesn’t seem to do anything. I set it up like so:

uniform extern texture ScreenTexture;    
const float bloomThreshhold = 0.4;
const float existingPixelColorMult = 1.1;

sampler ScreenS = sampler_state
{
    Texture = <ScreenTexture>;    
};

float4 BloomedColor(float2 texCoord: TEXCOORD0) : COLOR
{
    // pick a pixel on the screen for this pixel, based on
    // the calculated offset and direction
    float2 temp = texCoord;
    temp.x += 1;
    float4 mainPixelColor = 0;    
    /*
    float4 pixelPlus1X = tex2D(ScreenS, temp);
    temp.x -= 2;
    float4 pixelMinus1X = tex2D(ScreenS, temp);
    temp.x += 1;
    temp.y += 1;
    float4 pixelPlus1Y = tex2D(ScreenS, temp);
    temp.y -= 2;
    float4 pixelMinus1Y = tex2D(ScreenS, temp);
    */

    return mainPixelColor;
}

technique Bloom
{
    pass P0
    {
        PixelShader = compile ps_1_1 BloomedColor();
    }
}

with the loading code like:

        glowEffect = Content.Load<Effect>("GlowShader");
        glowEffect.CurrentTechnique = glowEffect.Techniques[0];

and use code is:

            spriteBatch.Begin();
            glowEffect.Begin();
            glowEffect.CurrentTechnique.Passes[0].Begin();
            spriteBatch.Draw(screenImage, Vector2.Zero, Color.White);
            spriteBatch.End();
            glowEffect.CurrentTechnique.Passes[0].End();
            glowEffect.End();

Loading seems to work fine, and there are no errors thrown when I use that method to render the texture, but it acts like the effect code isn’t in there. It can’t be that I’m using the wrong version of shaders (I tested with 2.0 and 1.1 versions), so why? (Using XNA 3.1)

  • 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-05-26T15:06:23+00:00Added an answer on May 26, 2026 at 3:06 pm

    You’re returning 0 for every pixel. You have commented out any code that would return a different value than 0. 0 is black and if you’re doing any sort of render you’ll either get black (if the blend mode shows this as a color) or no change (if the blend mode multiplies the result). You can of course (if you were just attempting to see if the shader is being loaded and operated) try using an oddball color. Neon green anyone? Then, once you confirm it is being at least processed, start uncommenting that code and assessing the result.

    Finally, if Bloom is what you’re after, Microsoft has a very useful sample you will probably learn a lot from here:

    http://create.msdn.com/en-US/education/catalog/sample/bloom

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

Sidebar

Related Questions

I set up the basic Authentication/Authorization set up, but a problem now is that
there is a question floated. It's set in basic SQL terms, but its nature
The standard defines basic source character set basic execution character set and its wide
I have a basic set-up like this: <div class=stop> <span class=point></span> </div> <div class=stop>
I'm attempting to set up basic logging to the windows event log in .net
What are the basic minimum set of Code Analysis rules that you would recommend
I am trying to set up a basic Silverlight application to run behind the
In a basic mysql insert you are able to set a password variable 'PASSWORD($password)'
My basic use case is do some processing, set flash[:notice] , and then redirect
I've got a basic HTTP client set up in C++, which works ok so

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.