Giter VIP home page Giter VIP logo

vicrucann / shader-3dcurve Goto Github PK

View Code? Open in Web Editor NEW
146.0 10.0 22.0 426 KB

:dizzy: GLSL shader that enables drawing of thick and smooth lines/curves in 3D (OpenSceneGraph visualization)

Home Page: http://vicrucann.github.io/tutorials/osg-shader-3dlines/

License: MIT License

CMake 2.48% GLSL 52.19% C++ 45.33%
glsl-shader bezier-curves fragment-shader polyline-shaders openscenegraph example-project

shader-3dcurve's People

Contributors

bogdanni avatar vicrucann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shader-3dcurve's Issues

OpenGL Error when running in linux without qt

We compile this project without qt in linux and there is no compiler or linker error.When we try to run we got this error.

OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
...
OpenGL error 'invalid enumerant' at after RenderBin::draw(..)

Windows pops up but there is no shape in the scene.

Harden against arbitrary inputs

The first three normalize() in drawSegment() of polyline.geom may have trouble with arbitrary input.

I had to define

vec2 safe_normalize(vec2 v)
{
    float len = length(v);
    if (len == 0)
        return vec2(0, 1); // arbitrary
    else
        return v / len;
}

In my observation, ATI drivers do the right thing, NVIDIA and Intel drivers return something unreasonable.

The second pair of normalize() are maybe safe (?).

interpolation error

Hi, your idea is great! Howerve, I found that gl_Positions are used for interpolation before normalized by gl_Position.w, which is a non-linear behavior. I suppose they should be normalized by w and then interpolated to get bezier points.
Thanks for your sharing!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.