Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Why is my scene getting rendered in the top-right corner, multiple times?
Print
Pages: [
1
]
Author
Topic: Why is my scene getting rendered in the top-right corner, multiple times? (Read 2217 times)
0 Members and 1 Guest are viewing this topic.
Sajmon
Newbie
Posts: 16
Why is my scene getting rendered in the top-right corner, multiple times?
«
on:
May 29, 2019, 10:25:24 pm »
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?
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Re: Why is my scene getting rendered in the top-right corner, multiple times?
«
Reply #1 on:
May 30, 2019, 09:16:48 am »
Any message from SFML in the standard (error) output?
Logged
Laurent Gomila - SFML developer
Sajmon
Newbie
Posts: 16
Re: Why is my scene getting rendered in the top-right corner, multiple times?
«
Reply #2 on:
May 30, 2019, 01:24:08 pm »
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.
Logged
Sajmon
Newbie
Posts: 16
Re: Why is my scene getting rendered in the top-right corner, multiple times?
«
Reply #3 on:
May 30, 2019, 02:26:00 pm »
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
Logged
Sajmon
Newbie
Posts: 16
Re: Why is my scene getting rendered in the top-right corner, multiple times?
«
Reply #4 on:
June 02, 2019, 04:02:37 pm »
Any ideas?
Logged
Sajmon
Newbie
Posts: 16
Re: Why is my scene getting rendered in the top-right corner, multiple times?
«
Reply #5 on:
June 07, 2019, 08:27:09 pm »
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
»
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Why is my scene getting rendered in the top-right corner, multiple times?
anything