-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: "Ruler" style croshair #163
Comments
Maybe it's possible to create a shader that does it? |
This will work #version 120
uniform sampler2D texture;
uniform sampler2D desktop;
uniform vec2 screenSize;
uniform vec2 mouse;
varying vec2 uvCoord;
void main() {
vec2 pixel = vec2(1,1)/screenSize;
vec2 mpos = vec2(mouse.x, -mouse.y)/screenSize + vec2(0,1);
vec4 color = vec4(0,0,0,0);
if (distance(mpos.x, uvCoord.x) < pixel.x || distance(mpos.y, uvCoord.y) < pixel.y) {
color = vec4(1,1,1,1);
}
gl_FragColor = color;
} |
I don't use a compositor so a shader isn't the solution for me
Nice. You could add your shader to https://github.com/naelstrof/slop/tree/master/shaderexamples in a pull request. |
Do you even see the generic outline when making a selection? If so, you might be able to just use that drawing code to also add your crosshair https://github.com/naelstrof/slop/blob/master/src/xshaperectangle.cpp |
I do.
Thanks for the pointer, I could do it someday. |
Aligning screen elements is easier with a crosshair that looks like this:
The text was updated successfully, but these errors were encountered: