This line:
vec2 displacementNDC = currentPosClip.xy/currentPosClip.w -
previousPosClip.xy/previousPosClip.w;
should be
displacementNDC = currentPosClip.xy/currentPosClip.w -
previousPosClip.xy/previousPosClip.w;
Otherwise you will be declaring a new variable with the name displacementNDC
the main
Hi osg-users!
I'm trying to write my first shader, it is a very simple test program which
sets the color on a sphere.
The color depends on whether the sphere has moved relative to its position in
the previous frame.
I use two varying variables, which are set in the vertex shader, see the code
2 matches
Mail list logo