Fur - vertex shader method

In vertex shader method, you load a shader file to material, then assign the material to mobile for fur effect. You needs check mobile's 'Bump' style for correct lighting. All shader files for VS fur method can be found at the "effects\fur\vs" folder.


Shader File
Preview Explanation
fur.fx One light lighting, one layer texture
fur_2lights.fx Two lights lighting, one layer texture
fur2t.fx One light lighting, two layers texture
fur2t__2lights.fx Two lights lighting, two layers texture


Factors
of all fur shaders:

vector __vFactor;                        // x: distance between two shells, y: uv scale, z: uv offset, w: color intensity

Usage:
material.setFactor(  length, density, sway, color  ); // also, you can set factor in Material Panel.

Example:

(fur = material)

-- set fur length, density, and sway fur
local len = 4
local density = 8
local sway = math.sin(GetFrameTime()*2) * 0.2
local color = math.sin( GetFrameTime() ) + 1;
fur.setFactor( len, density, sway, color )