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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:38:03+00:00 2026-05-13T10:38:03+00:00

How to do smooth Alpha channel keying with Silverlight 3 Pixel Shaders? I want

  • 0

How to do smooth Alpha channel keying with Silverlight 3 Pixel Shaders?

I want some HLSL filter (like this Shazzam HLSL example)

             sampler2D  implicitInputSampler : register(S0);


             float4 main(float2 uv : TEXCOORD) : COLOR
             {
               float4 color = tex2D( implicitInputSampler, uv );

             if( color.r + color.g + color.b < 1.9 ) {
             color.rgba = 0;
                 }

             return color;
             } 

to key not just the color I’m trying to key but for example if dark red consists of red and blue and I’m keying all blue i want to get transparent red.
(Probably this picture can explain what do I want)
From to Image
(source: narod.ru)

  • 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-13T10:38:03+00:00Added an answer on May 13, 2026 at 10:38 am

    Sounds like you just want to subtract a color rather then key it.

    float4 subtract = ... ; // color you want to remove
    float4 color = ... ;
    
    color.r -= subtract.r;
    ... // for b and g
    
    if ( color.r < 0 )
        color.r = 0;
    ... // for b and g
    

    After this, you can then use a color chooser to pick which color “subtract” would be and remove it. Hope thats what your trying to do.

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

Sidebar

Related Questions

To get some smooth graphics, I want to draw oversampled by factor 2 and
Chrome has a very smooth installation process and I would like to imitate this
Having some issues with smooth alpha gradients in texture files resulting in bad banding
I cannot get smooth lines for this graph. I have tried anti aliasing, increasing
I want to make a smooth and nice graph with no legend as it
What are some good steps to follow for a smooth migration from PHP4 to
I want a desktop application to provide a smooth user experience through deployment. In
When IE renders a filter: alpha(opacity=..) whether it's on an image or text. It
I essentially have an array of values like this: 0.25, 0.24, 0.27, 0.26, 0.29,
i need to smooth better this kind of plot, I've already used a moving

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.