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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:07:43+00:00 2026-05-24T14:07:43+00:00

Basically, i want to give 3 textures for each corner of a triangle, and

  • 0

Basically, i want to give 3 textures for each corner of a triangle, and interpolate from one texture to another, just like the colors would be interpolated with glColor() on the corners.

Edit: Since this doesnt seem to be possible via texture combiners, i am willing to do it with shaders.

This is the fragment shader code that i have now:

vec4 c = gl_Color;
gl_FragColor = texture2D(Texture0, TexCoord0)*c.r+texture2D(Texture1, TexCoord1)*c.g+texture2D(Texture2, TexCoord2)*c.b;

Im using the glColor(); to push colors (1,0,0), (0,1,0), (0,0,1) to the corners of each triangle, and then i read the color to see how much which texture i need to blend accordingly.

Now the problem is that i cant use colors on my vertices anymore, so im asking, what is the best approach for telling my fragment shader how to blend the textures + being able to use glColor() on each corner of the triangle to apply some coloring?

Edit2: i managed to get it work by sending a 3d texcoord that tells the blending ratios, but is this the best approach? i would like to hear more ideas on this.

  • 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-24T14:07:43+00:00Added an answer on May 24, 2026 at 2:07 pm

    I don’t think this is possible without using shaders. In your OpenGl code, I don’t see anyway OpenGl could know which texture to affect to each corner. That would require a vertex property (other than color or texture coordinates), which is not possible without shaders.

    However, maybe it can be possible with two textures, by using alpha blending (picking alpha value from the vertex color) on the second texture. but I’m not sure.

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

Sidebar

Related Questions

I am trying to copy one table over another one atomically. Basically I want
I basically want something like: TextView Button Button . . . TextView TextView SeekBar
I basically want to make things easier by just looping LinkButtons instead of making
I basically want to open a browser window from Word using VBA that does
I just basically want to add about 20 and sometimes 80 Proximity Alerts with
can some give me a good resource for the iphone filesystem? Basically I want
Basically I want to get the number of lines-of-code in the repository after each
I basically want to be able to say Hey, control give me your bitmap
Is this possible? Basically, I want to give my UIView a subview, and have
I want to give access to protected properties to another class. I have been

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.