View source
class Skin
package h3d.shader
extends SkinBase › Shader
@:directlyUsed@:src({ @input var input:{ var position : Vec3; var normal : Vec3; var weights : Vec3; var indexes : Bytes4}; var transformedTangent:Vec4; var previousTransformedPosition:Vec3; function vertex() { transformedPosition = (relativePosition * bonesMatrixes[int(input.indexes.x)]) * input.weights.x + (relativePosition * bonesMatrixes[int(input.indexes.y)]) * input.weights.y + (relativePosition * bonesMatrixes[int(input.indexes.z)]) * input.weights.z; transformedNormal = (input.normal * mat3(bonesMatrixes[int(input.indexes.x)])) * input.weights.x + (input.normal * mat3(bonesMatrixes[int(input.indexes.y)])) * input.weights.y + (input.normal * mat3(bonesMatrixes[int(input.indexes.z)])) * input.weights.z; if (fourBonesByVertex) { var w4 = 1 - (input.weights.x + input.weights.y + input.weights.z); transformedPosition += (relativePosition * bonesMatrixes[int(input.indexes.w)]) * w4; transformedNormal += (input.normal * mat3(bonesMatrixes[int(input.indexes.z)])) * w4; }; previousTransformedPosition = transformedPosition; transformedNormal = normalize(transformedNormal); }; })@:build(hxsl.Macros.buildShader())@:autoBuild(hxsl.Macros.buildShader())Constructor
Methods
Inherited Variables
Inherited Methods
Defined by SkinBase
Defined by Shader
setPriority(v:Int):Void
Shader priority should only be changed before the shader is added to a material.