#include "common.hlsli" #include "skin.hlsli" // #define SKIN_2 struct vf { float4 hpos : POSITION; float2 tc0 : TEXCOORD0; // base float3 tc1 : TEXCOORD1; // environment float fog : FOG; }; vf _main(v_model v) { vf o; float4 pos = v.pos; float3 pos_w = mul(m_W, pos); float4 pos_w4 = float4(pos_w, 1); float3 norm_w = normalize(mul(m_W, v.norm)); o.hpos = mul(m_WVP, pos); // xform, input in world coords o.tc0 = v.tc.xy; // copy tc o.tc1 = calc_reflection(pos_w, norm_w); o.fog = calc_fogging(pos_w4); // fog, input in world coords return o; } #define SKIN_VF vf #include "skin_main.hlsli"