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

  • Home
  • SEARCH
  • 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 6548649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:59:45+00:00 2026-05-25T11:59:45+00:00

I have implement the effect and Transition using pixel shader files. When i apply

  • 0

I have implement the effect and Transition using pixel shader files. When i apply effect and transition separately it working fine, but if i am applying both simultaneously it is not working. How can apply multiple shader to a sprite. Below is code what i am doing.

_effect = Effect.FromFile(_parentRVRenderer.Device, path, null, ShaderFlags.None, null);
_effect1 = Effect.FromFile(_parentRVRenderer.Device, path1, null, ShaderFlags.None, null);
_effect.Technique = "TransformTexture";
_effect1.Technique = "TransformTexture";

_effect1.Begin(0);
_effect1.BeginPass(0);
_effect.Begin(0);
_effect.BeginPass(0);
sprint.Begin()
Sprite.Draw();
....
  • 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-25T11:59:45+00:00Added an answer on May 25, 2026 at 11:59 am

    Put your two pixel shader functions in the same shader, and use a two-pass technique that applies a different pixel shader in each pass.

    You still have to use two render targets to bounce the output from the first pass to the other as stated above, but it’s better to use the two-pass approach than sending the render target to another shader technique.

    Pseudocode:

    RenderTarget2D[2] targets;
    
    // (Draw all your sprites to target 0)
    
    // target 1 will be empty, will be used in pass 0 (even pass)
    
    effect.Technique = "TwoPassTechnique";
    
    for (int i = 0; i < effect.Passes.Count; i++) 
    {
        // Even pass sets target 1, odd pass sets target 0
        GraphicsDevice.setRenderTarget(targets[1 - i % 2]);
        effect(i).BeginPass;
    
        // Even pass samples texture from target 0, odd pass uses target 1
        effect(i).Parameters["texture"].SetValue(targets[i % 2]);
    
        // Draw a 2D quad with extents (-1, -1), (1, 1) in screen space 
    }
    // Final contents are now stored in target 0
    
    // (Draw target 0's texture to the screen, using a sprite or another 2D quad)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to implement a one linked list but it should put object in
I am using a combination of prototype and script.aculo.us to implement a lightbox effect
Using the examples from the CGI::Session::Auth::DBI and CGI::Session::Auth pages, I have attempted to implement
I have been trying to implement pinch zoom/in-out for PhotoView (a UIImageView instance) using
I have found an effect here and tried to implement the same adding some
Does any one have any experience on how to implement the halo(outline) effect for
I have to implement the VinPower application. They offer a Java version, a C
I have to implement MPI system in a cluster. If anyone here has any
I have to implement a middleware system for file sharing, and it has to
I have to implement a IExceptionHandler for the Enteprise Library 4.1. In my particular

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.