Fixed capsule lights rendering

This commit is contained in:
dexy
2019-12-12 22:21:18 +11:00
Unverified
parent 66b512e8b6
commit 6becfaea95
8 changed files with 44 additions and 5 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ VS_Output main(float4 ipos : POSITION, uint iid : SV_InstanceID)
else if (InstType == 4)//capsule
{
float3 cpos = ipos.xyz * extent;
cpos += InstCapsuleExtent * (ipos.w * 2 - 1) * 0.1;
cpos.y += abs(InstCapsuleExtent.y) * (ipos.w - 0.5);
opos = (cpos.x * InstTangentX.xyz) + (cpos.y * InstDirection.xyz) + (cpos.z * InstTangentY.xyz);
}