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
- SteamOS 3.5.18 Preview released for Steam Deck
- Stardew Valley 1.6.4 brings even more new free content
- Phantom Fury gets Steam Deck Verified ahead of release
- Check out this casual fab farming game bundle, plus a whole bunch of Godot Engine courses
- Action-filled naval sandbox game Windward follow-up Windward Horizon announced
- > See more over 30 days here
-
Lefties unite! Counter-Strike 2 now lets you swap hands…
- whizse -
NVIDIA developer contributing to the open source NVK dr…
- Mohandevir -
Lefties unite! Counter-Strike 2 now lets you swap hands…
- QDS -
Lefties unite! Counter-Strike 2 now lets you swap hands…
- denyasis -
Lefties unite! Counter-Strike 2 now lets you swap hands…
- Liam Dawe - > See more comments
Latest Forum Posts
- Help needed with blocklist
- AntonioHensley - Divinity Original Sin II - Definitive Edition - stopped starting …
- spiry2sick - Hello to all
- Hamish - Weekend Players' Club 4/19/2024
- StoneColdSpider - What sorta display and audio setup do you folks got?
- Arehandoro - 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.