While you're here, please consider supporting GamingOnLinux on:
Reward Tiers: Patreon. Plain Donations: PayPal.
This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!
You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Reward Tiers: Patreon. Plain Donations: PayPal.
This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!
You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register
-
Dr. Robotnik's Ring Racers v2.1 out with Linux support …
- Thibug -
Bye Sweet Carole blends horror with what looks like cla…
- Arehandoro -
Steam Deck most played for April 2024 has plenty of Fal…
- Eri -
The big hit medieval strategy game Manor Lords works we…
- gabber -
Pick up Golf With Your Friends, Trepang2, Gord, Neon Ab…
- Phlebiac - > See more comments
Latest Forum Posts
- Manic Minutes
- Technopeasant - Weekend Players' Club 4/26/2024
- Pengling - Happy International Workers' Day everyone.
- Linux_Rocks - AMD Game Bundle Starfield seems also to work explicitly with Linu…
- Alexander - Extra Steam Keys from bundles
- Gully42 - See more posts
View PC info
#version 450 core
out vec4 color;
void main()
{
color = vec4(abs(gl_FragCoord.x), abs(gl_FragCoord.y), abs(gl_FragCoord.z), 0.0);
}
I'm expecting every pixel drawn to be a different color but instead I'm getting a solid yellow color like so:
View cookie preferences.
Accept & Show Accept All & Don't show this again Direct Link
What am I doing wrong? (opengl 4.5 core btw if you didn't notice)
View PC info
View PC info
Disclaimer: It's been long a while since I've tampered with shaders, so I could be entirely wrong ;)
View PC info
View PC info
View cookie preferences.
Accept & Show Accept All & Don't show this again Direct Link
(screen tearing lol)
Thanks everyone
glBindFragDataLocation(shaderProgram, 0, "color");
Also you want your alpha to be at full value, so 1.0, not 0.0. And your colors will be solid, because gl_FragCoord values are way above 1.0, and 1.0 is full value. You can try dividing them by your screen size.