Open RobertBeckebans opened 3 weeks ago
From https://docs.google.com/presentation/d/19x9XDjUvkW_9gsfsMQzt3hZbRNziVsoCEHOn4AercAc/edit#slide=id.g5791d9ed1_015
This probably needs a rewrite of all vertex shaders but it's worth the effort.
Pseudocode:
Matrix WorldToEyeClipMatrix[2] // computed from SDK Vector4 EyeClipEdge[2]={(-1,0,0,1), (1,0,0,1)} float EyeOffsetScale[2]={0.5,-0.5} uint eyeIndex = instanceID & 1 // use low bit as eye index. Vector4 clipPos = worldPos * WorldToEyeClipMatrix[eyeIndex] cullDistanceOut.x = clipDistanceOut.x = clipPos · EyeClipEdge[eyeIndex] clipPos.x *= 0.5; // shrink to half of the screen clipPos.x += EyeOffsetScale[eyeIndex] * clipPos.w; // scoot left or right. clipPositionOut = clipPos
From https://docs.google.com/presentation/d/19x9XDjUvkW_9gsfsMQzt3hZbRNziVsoCEHOn4AercAc/edit#slide=id.g5791d9ed1_015
This probably needs a rewrite of all vertex shaders but it's worth the effort.
Pseudocode: