Commit 0de6a0e2 authored by Matthias Möller's avatar Matthias Möller

tenter: instance skeleton-renderobjects

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@20113 383ad7c9-94d9-4d36-a494-682f7c89f535
parent be4cace6
in vec4 inModelView0;
in vec4 inModelView1;
in vec4 inModelView2;
void main()
{
SG_VERTEX_BEGIN;
// transform with instance matrix
sg_vPosVS.x = dot(inModelView0, inPosition);
sg_vPosVS.y = dot(inModelView1, inPosition);
sg_vPosVS.z = dot(inModelView2, inPosition);
sg_vPosVS.w = 1.0;
sg_vPosPS = g_mP * sg_vPosVS;
#ifdef SG_INPUT_NORMALOS
sg_vNormalVS.x = dot(inModelView0.xyz, SG_INPUT_NORMALOS.xyz);
sg_vNormalVS.y = dot(inModelView1.xyz, SG_INPUT_NORMALOS.xyz);
sg_vNormalVS.z = dot(inModelView2.xyz, SG_INPUT_NORMALOS.xyz);
sg_vNormalVS = normalize(sg_vNormalVS);
#endif
SG_VERTEX_END;
}
\ No newline at end of file
in vec4 inModelView0;
in vec4 inModelView1;
in vec4 inModelView2;
in vec3 inModelViewIT0;
in vec3 inModelViewIT1;
in vec3 inModelViewIT2;
void main()
{
SG_VERTEX_BEGIN;
// transform with instance matrix
sg_vPosVS.x = dot(inModelView0, inPosition);
sg_vPosVS.y = dot(inModelView1, inPosition);
sg_vPosVS.z = dot(inModelView2, inPosition);
sg_vPosVS.w = 1.0;
sg_vPosPS = g_mP * sg_vPosVS;
#ifdef SG_INPUT_NORMALOS
sg_vNormalVS.x = dot(inModelViewIT0, SG_INPUT_NORMALOS.xyz);
sg_vNormalVS.y = dot(inModelViewIT1, SG_INPUT_NORMALOS.xyz);
sg_vNormalVS.z = dot(inModelViewIT2, SG_INPUT_NORMALOS.xyz);
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