Commit 77335a05 authored by Mathias Goldau's avatar Mathias Goldau

[CHANGE] Module fiberStipples, now used a separate file for shader varyings as...

[CHANGE] Module fiberStipples, now used a separate file for shader varyings as otherwise this is nasty code duplication.
parent 926372ea
......@@ -24,43 +24,19 @@
#version 120
#include "WGEUtils.glsl"
#include "WGEUtils.glsl" // for distancePointLineSegment(...)
#include "WFiberStipples-varyings.glsl"
/**
* Color of the fiber stipples. This will be further combined with tract probability.
*/
uniform vec4 u_color;
/**
* First focal point, which is one of the endings of the projected diffusion direction.
*/
varying vec3 focalPoint1;
/**
* Second focal point, which is one of the endings of the projected diffusion direction.
*/
varying vec3 focalPoint2;
/**
* First focal point, scaled.
*/
varying vec3 scaledFocalPoint1;
/**
* Second focal point, scaled.
*/
varying vec3 scaledFocalPoint2;
/**
* Middle point of the quad in texture coordinates, needed for scaling the projection of the principal diffusion direction to fit inside quad.
*/
uniform vec3 middlePoint_tex = vec3( 0.5, 0.5, 0.0 );
/**
* Probability of the tract, used for further color mapping.
*/
varying float probability;
/**
* Scale the radius of the glyphs (aka stipples).
*/
......
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#version 120
/**
* First focal point, which is one of the endings of the projected diffusion direction.
*/
varying vec3 focalPoint1;
/**
* Second focal point, which is one of the endings of the projected diffusion direction.
*/
varying vec3 focalPoint2;
/**
* First focal point, scaled.
*/
varying vec3 scaledFocalPoint1;
/**
* Second focal poin, scaled.
*/
varying vec3 scaledFocalPoint2;
/**
* Scaled connectivity score; now between 0.0...1.0.
*/
varying float probability;
......@@ -25,6 +25,7 @@
#version 120
#include "WGETextureTools.glsl"
#include "WFiberStipples-varyings.glsl"
/**
* These two uniforms are needed to transform the vectors out of their texture
......@@ -79,47 +80,27 @@ uniform float u_pixelSizeY;
*/
uniform float u_pixelSizeZ;
// vectors spanning the plane of the quad
uniform vec3 u_aVec;
uniform vec3 u_bVec;
/**
* First focal point, which is one of the endings of the projected diffusion direction.
* First plane vector spanning the plane of the quad.
*/
varying vec3 focalPoint1;
uniform vec3 u_aVec;
/**
* Second focal point, which is one of the endings of the projected diffusion direction.
* Second plane vector spanning the plane of the quad.
*/
varying vec3 focalPoint2;
uniform vec3 u_bVec;
// Scaled focal points, as otherwise the the stipple endings may not fit inside quad.
/**
* Fixed factor for scaling.
* Used for scaling the focal points, as otherwise the the stipple endings may not fit inside quad.
*/
uniform float scale = 0.8;
/**
* First focal point, scaled.
*/
varying vec3 scaledFocalPoint1;
/**
* Second focal poin, scaled.
*/
varying vec3 scaledFocalPoint2;
/**
* Maximum connectivity score withing the probabilistic tract dataset. This is
* needed for scaling the connectivities between 0.0 and 1.0.
*/
uniform float u_maxConnectivityScore;
/**
* Scaled connectivity score; now between 0.0...1.0.
*/
varying float probability;
/**
* Probabilities below this threshold are ignored and discarded.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment