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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:24:46+00:00 2026-06-14T09:24:46+00:00

When you draw triangle with 3 different colors for 3 vertices, XNA automatically interpolates

  • 0

When you draw triangle with 3 different colors for 3 vertices, XNA automatically interpolates pixel colors in between these vertices. I would like to disable this behavior and supply my own algorithm that determines color of in-between pixels (for example, use average of 3 colors). How this should be done in XNA?

  • 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-14T09:24:47+00:00Added an answer on June 14, 2026 at 9:24 am

    The interpolation is the basic behaviour of a shader, you can not avoid that.
    if you send vertex data to a pixel shader, the data of the three vertex that form a triangle will be interpolated.

    So if you want to use the average of the three colors, one option maybe precalculate them in the cpu… and send it to gpu through a differet vertex buffer, this way you can change it when you want without change the vertex buffer that contain the vertex positions….

    Of course if a vertex is shared with two triangles, and it has different colors, you have to duplicate it.

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

Sidebar

Related Questions

I would like to draw triangles, and polygons To draw a triangle I use
I have a text file containing the vertices of a triangle. I would like
I would like to know how to draw a triangle with a transparent background
How I can draw a Pascal's triangle in PASCAL Programming like a diamond from
I draw an triangle using these piece of code CGPoint center; center = CGPointMake(x1,
How to draw a triangle using SlimDX's Direct2D interface given triangle vertices are given
Notice this app: How can I draw that sort of triangle above an existing
I draw a triangle using mouse drag. After drawing many different triangles, I wanted
I have a set of textures which I need to draw at different vertices
This is mostly a theoretical question. Let's say I want to draw a triangle

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.