All pastes #434494 Raw Edit

Stuff

public text v1 · immutable
·published 2007-04-11 13:00 UTC
rendered paste body
vertexOUT main(vertexIN vIn, uniform float4x4 modelViewProj, uniform float scale) {
	vertexOUT vOut;
	float4 offset = float4(normalize(vIn.normal) * 0.01, 1);
	float4 position = vIn.position + offset;
	
	// project point onto screen
	vOut.ccPos = mul(modelViewProj, position);
		
	// copy position
	vOut.objectPos = position.xyz;
	
	// copy Normal
	vOut.normal = vIn.normal;
	
	return vOut;
}