⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 skinning.vert

📁 可以从mpq等文件中导出模型
💻 VERT
字号:
attribute vec4 bone;
attribute vec4 weight;
uniform mat4 boneMatrices[60];

void main()
{	
    vec4 blendVertex;
    vec4 blendWeight = weight;
	ivec4 blendBone = ivec4(bone);
    
    for(int i = 0; i < 4; i++)
    {	
    	if(blendWeight.x > 0.0)
    	{	
		 	blendVertex += vec4((boneMatrices[blendBone.x] * gl_Vertex).xyz, 1.0) * blendWeight.x;
     	 	blendBone = blendBone.yzwx;
    		blendWeight = blendWeight.yzwx;
   		}
		else break;
    }
	
   	gl_Position = gl_ModelViewProjectionMatrix * blendVertex;
	gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
	gl_FrontColor = gl_Color;
	
	vec4 ecPos = gl_ModelViewMatrix * gl_Vertex;
	gl_FogFragCoord = abs(ecPos.z);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -