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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jdogg2727

Pages: [1]
1
Graphics / Good Way To "Lock" Something To A View
« on: March 12, 2017, 06:53:01 pm »
So I looked around for a good way to basically attach something to a view, but I couldn't find any great solutions.

Right now I'm trying to draw a tool box with text and images over top the rest of my editor for I can see information without it looking like a mess. Each frame the view moves I have to reset the position of the tool box, each image, and each text object.

if(*view moves*){
*update positioning for each object* //I don't want this step :(
...
...
}

draw(*object*)
...
...

Is there a way I can simply "attach" these to the view? Or would I maybe be better off drawing each of these to an image, positioning the image and then drawing that?

2
General / Re: Getting Rid Of Alphas Below A Certain Threshold
« on: February 14, 2017, 06:48:31 pm »
Ok cool, I would like to try the shader implementaion, would I need a Vertex shader and a Fragment shader? I tried implementing the shader and I'm just getting a white screen or artifacts, and I'm using just a fragment shader.

uniform float threshold;

void main()
{
    vec4 pixel = gl_Color;
    if (pixel.a >= threshold){
        pixel.a = 0.5f;
    }
    else{
        discard;
    }

    gl_FragColor = pixel;
}

3
General / Getting Rid Of Alphas Below A Certain Threshold
« on: February 13, 2017, 11:25:05 pm »
I am currently following a tutorial on making 2D metaballs, http://nullcandy.com/2d-metaballs-in-xna/ and I'm trying to translate it to SFML.

currently I have the additive blending working, but I can't figure out how to get rid of alpha values below a certain point and make the alpha values above a certain point opaque.

From this...


To this...


Can I do that with SFML BlendModes? I'm still really new to a lot of the graphical side of SFML so I don't know which way would be the right way to go about it, thanks for any help ahead of time!

Pages: [1]
anything