Skip to content

Commit

Permalink
Use linear epsilon scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
brimson committed Jul 9, 2022
1 parent 406b045 commit 130a7ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shaders/cMotionBlur.fx
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ namespace OpticalFlowLK
S[3] = tex2D(Sample_Common_1_B, TexCoord.zy).xy;

// A.x = Ix^2 (A11); A.y = Iy^2 (A22); A.z = IxIy (A12)
float3 A = float3(FP16_MINIMUM, FP16_MINIMUM, 0.0) * pow(4.0, Level);
float3 A = ldexp(float3(FP16_MINIMUM, FP16_MINIMUM, 0.0), Level);
A += (S[0].xyx * S[0].xyy);
A += (S[1].xyx * S[1].xyy);
A += (S[2].xyx * S[2].xyy);
Expand Down
2 changes: 1 addition & 1 deletion shaders/cOpticalFlowLK.fx
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ namespace OpticalFlowLK
S[3] = tex2D(Sample_Common_1_B, TexCoord.zy).xy;

// A.x = Ix^2 (A11); A.y = Iy^2 (A22); A.z = IxIy (A12)
float3 A = float3(FP16_MINIMUM, FP16_MINIMUM, 0.0) * pow(4.0, Level);
float3 A = ldexp(float3(FP16_MINIMUM, FP16_MINIMUM, 0.0), Level);
A += (S[0].xyx * S[0].xyy);
A += (S[1].xyx * S[1].xyy);
A += (S[2].xyx * S[2].xyy);
Expand Down

0 comments on commit 130a7ab

Please sign in to comment.