void EdgeVP( float4 position : POSITION, float4 normal : NORMAL0, out float4 oPos : POSITION, out float4 oColor : COLOR, uniform float4 edgeColor, uniform float4 eyePosition, uniform float sinkScale, uniform float edgeScale, uniform float4x4 worldViewProj ) { float4 E = normalize(eyePosition); position = mul(worldViewProj, position - sinkScale*E); normal.w = 0; normal = normalize(mul(worldViewProj, normal)); position += ((sinkScale/8.0f)+1.0) * edgeScale * float4(normal.xy, 0, 0); oPos=position; oColor=edgeColor; }