Skip to content

Commit

Permalink
Merge branch 'features/167_radiometryUpdate' into bugs/batchRendering…
Browse files Browse the repository at this point in the history
…Frustum
  • Loading branch information
RebeccaNowak committed Jun 27, 2023
2 parents 165c7f6 + d5d2cd0 commit 9e7d635
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/PRo3D.Base/Utilities.fs
Original file line number Diff line number Diff line change
Expand Up @@ -568,9 +568,14 @@ module Shader =
let abB : V3d = uniform?abB
let nc = V4d(v.c.X*255.0, v.c.Y*255.0, v.c.Z*255.0, 255.0)

let red = (myTrunc (abR.X + ((nc.X * (abR.Y-abR.X)) / 255.0))) / 255.0
let green = (myTrunc (abG.X + ((nc.Y * (abG.Y-abG.X)) / 255.0))) / 255.0
let blue = (myTrunc (abB.X + ((nc.Z * (abB.Y-abB.X)) / 255.0))) / 255.0
//let red = (myTrunc (abR.X + ((nc.X * (abR.Y-abR.X)) / 255.0))) / 255.0
//let green = (myTrunc (abG.X + ((nc.Y * (abG.Y-abG.X)) / 255.0))) / 255.0
//let blue = (myTrunc (abB.X + ((nc.Z * (abB.Y-abB.X)) / 255.0))) / 255.0

let red = (myTrunc (((nc.X * 255.0) / (abR.Y-abR.X)))) / 255.0
let green = (myTrunc (((nc.Y * 255.0) / (abG.Y-abG.X)))) / 255.0
let blue = (myTrunc (((nc.Z * 255.0) / (abB.Y-abB.X)))) / 255.0

return V4d(red, green, blue, 1.0)
else
return v.c
Expand Down

0 comments on commit 9e7d635

Please sign in to comment.