SHARE
TWEET
Untitled
a guest
Dec 26th, 2014
191
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- #version 400
- in vec3 pos;
- in float radius;
- uniform mat4 mView;
- uniform mat4 projection;
- uniform vec2 screenSize;
- out float thickness;
- void main() {
- //calculate normal
- vec3 normal;
- normal.xy = gl_PointCoord * 2.0 - 1.0;
- float r2 = dot(normal.xy, normal.xy);
- if (r2 > 1.0f) {
- discard;
- }
- float nz = sqrt(1 - r2);
- //thickness = nz * 1.25 * 2.0f * exp(-r2 * 2.0f);
- //thickness = 1 - r2;
- //thickness = 1;
- thickness = 0.5f;
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

