Commit b18ae33b authored by Christopher Tenter's avatar Christopher Tenter

add support for non-uniform scaling in ArrowNode refs #2509

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@21078 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 2577c87d
......@@ -2,6 +2,12 @@ in vec4 inWorld0;
in vec4 inWorld1;
in vec4 inWorld2;
in vec3 inWorldIT0;
in vec3 inWorldIT1;
in vec3 inWorldIT2;
void main()
{
SG_VERTEX_BEGIN;
......@@ -17,9 +23,9 @@ void main()
sg_vPosVS = g_mWV * arrownode_posWS;
sg_vPosPS = g_mWVP * arrownode_posWS;
#ifdef SG_INPUT_NORMALOS
sg_vNormalVS.x = dot(inWorld0.xyz, SG_INPUT_NORMALOS.xyz);
sg_vNormalVS.y = dot(inWorld1.xyz, SG_INPUT_NORMALOS.xyz);
sg_vNormalVS.z = dot(inWorld2.xyz, SG_INPUT_NORMALOS.xyz);
sg_vNormalVS.x = dot(inWorldIT0.xyz, SG_INPUT_NORMALOS.xyz);
sg_vNormalVS.y = dot(inWorldIT1.xyz, SG_INPUT_NORMALOS.xyz);
sg_vNormalVS.z = dot(inWorldIT2.xyz, SG_INPUT_NORMALOS.xyz);
sg_vNormalVS = g_mWVIT * sg_vNormalVS;
sg_vNormalVS = normalize(sg_vNormalVS);
......
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