Commit 2577c87d authored by Hans-Christian Ebke's avatar Hans-Christian Ebke

Work in progress #2509


git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@21075 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b99a314a
in vec4 inWorld0;
in vec4 inWorld1;
in vec4 inWorld2;
void main()
{
SG_VERTEX_BEGIN;
// transform with instance world matrix
vec4 arrownode_posWS;
arrownode_posWS.x = dot(inWorld0, inPosition);
arrownode_posWS.y = dot(inWorld1, inPosition);
arrownode_posWS.z = dot(inWorld2, inPosition);
arrownode_posWS.w = 1.0;
// transform to view and clip space
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 = g_mWVIT * sg_vNormalVS;
sg_vNormalVS = normalize(sg_vNormalVS);
#endif
SG_VERTEX_END;
}
\ No newline at end of file
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