Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Why is my scene getting rendered in the top-right corner, multiple times?  (Read 2212 times)

0 Members and 1 Guest are viewing this topic.

Sajmon

  • Newbie
  • *
  • Posts: 16
    • View Profile
Hey, I'm using both OpenGL and SFML.

Trying the game on a friend's computer (kinda old).
And I'm getting this result. [see attachment]

I've got no clue where to look.
I messed around with glViewport but that didn't give the "repeating" pattern. Like, why are there four of them?

Anyone got an idea?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Any message from SFML in the standard (error) output?
Laurent Gomila - SFML developer

Sajmon

  • Newbie
  • *
  • Posts: 16
    • View Profile
The only log from SFML was that:

"The sf::ContextSettings is not supported, we changed it a bit."
I have contextsettings to 3.2, which he also has.
And the only setting that didn't work is AA, it went down from 16 -> 8.
So there's not anything to go on there either.


Sajmon

  • Newbie
  • *
  • Posts: 16
    • View Profile
I also added a bunch of logs to locate the issue. But nothing out of the ordinary.

Windowsize: 1920, 1080 (correct)
Viewport: (0, 0, 1920, 1080) (correct?)
VA: 1, FB: 1, Sampler: 1, ColorAttachment(texture): 1


Sajmon

  • Newbie
  • *
  • Posts: 16
    • View Profile
Any ideas?

Sajmon

  • Newbie
  • *
  • Posts: 16
    • View Profile
Figured it out.
OpenGL shaders compiled the shaders differently and assigned different locations.

My post-fx shaders have these attributes;
// some_post_fx.glsl

#version 150

in vec2 inputPosition;             // 0
in vec2 inputTexCoords;    // 1

int main() {
  //
}

 

And the locations on my computer after the shader compiled is:
pos = 0
tex = 1

And on his computer, these two were flipped.
tex = 0
pos = 1

Which results in that weird double in top corner pattern.
I was using (layout = 0) before, but when I downgraded all my shaders to OpenGL 3.2 I forgot to make a system to make sure the locations were correct for attributes. Fuck me.

But very interesting.

« Last Edit: June 07, 2019, 08:28:45 pm by Sajmon »

 

anything