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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:48:23+00:00 2026-05-24T23:48:23+00:00

I made a simple app that takes an input image and outputs a processed

  • 0

I made a simple app that takes an input image and outputs a processed one using a fragment shader. When using a 2^n image it’s OK. But if I use a rectangular not-power-of-2 image I get a black stitch running from top to bottom.

This is the original:

enter image description here

This is after being processed:

enter image description here

Here’s my fragment shader:

precision mediump float;
uniform vec2 uSize;
uniform sampler2D sTexture;
void main()
{
    gl_FragColor = texture2D(sTexture, vec2(gl_FragCoord) / uSize)
}

Where, uSize is a vec2 having the size of the image

Generally I can work with a power-of-2 textures, but as OGLES2 supports rectangular textures I was thinking of sparing myself some work.

Thanks!

UPDATE

Here go my vertices:

static GLfloat vVertices[] =
    {
     -1.0f,  1.0f, 0.0f,
     -1.0f, -1.0f, 0.0f,
      1.0f, -1.0f, 0.0f,

      1.0f, -1.0f, 0.0f,
      1.0f,  1.0f, 0.0f,
     -1.0f,  1.0f, 0.0f,
    };

And here is the vertex shader:

attribute vec4 vPosition;
void main()
{
   gl_Position = vPosition;
}

UPDATE

Now, that’s strange. Here are the two triangles rendered separately (first using the first 3 vertices, and then using the next (last) three).

Here go for the square image (as expected):

enter image description here
enter image description here

And here are how the same triangles look for the rectangle image/texture. They look bizarre:

enter image description here
enter image description here

They don’t look like triangles at all. Does anyone know what’s happening?

  • 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-24T23:48:23+00:00Added an answer on May 24, 2026 at 11:48 pm

    Seems the drivers were bad. Updating them fixed the problem.

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

Sidebar

Related Questions

We made a simple application and using GoogleAppEngineLauncher (GAEL) ran that locally. Then we
I made a program in Xcode, being a simple calculator that takes a first
Ok I have made a simple radio app that streams music from my university
I've made a very simple app that just displays a Google map. However, it
I have a simple app that has a set of coloured views, one red,
This module is part of a simple todo app I made with Python... def
On Windows, testing different OSes is made simple using VMs. Is there a simple
I made a simple counter, but it increments by 2 instead of 1. $handle
I've made a simple http server using Twisted, which sends the Content-Type: multipart/x-mixed-replace header.
For an assignment I've made a simple C++ program that uses a superclass (Student)

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.