Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Harmonikater
BF2-3dsMax-Tools
Commits
3b90a7bf
Commit
3b90a7bf
authored
Sep 08, 2019
by
Harmonikater
Browse files
Attempt to fix gamma issues in terrain splitting
parent
2e839641
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/bf2/levels/TerrainLightmap.ms
View file @
3b90a7bf
...
...
@@ -39,7 +39,7 @@ fn SplitTerrainLightMap source patches outFolder =
)
local patchName = "tx" + xStr + "x" + yStr + ".tga"
local patchFile = outFolder + "\\" + patchName
local dest = Bitmap patchsize patchsize
local dest = Bitmap patchsize patchsize
gamma:2.2
local patchUniform = True
local closePixels = #()
local cumError = 0
...
...
@@ -47,7 +47,14 @@ fn SplitTerrainLightMap source patches outFolder =
for row = 0 to patchsize-1 do
(
sourcePatchRow = getPixels source (Point2 (x*patchsize) (((size-y)*patchsize) - row - 1)) patchsize
try
(
sourcePatchRow = getPixels source (Point2 (x*patchsize) (((size-y)*patchsize) - row - 1)) patchsize linear:true
)
catch
(
sourcePatchRow = getPixels source (Point2 (x*patchsize) (((size-y)*patchsize) - row - 1)) patchsize
)
destRow = getPixels dest (Point2 0 row) patchsize
if closePixels.count == 0 do append closePixels sourcePatchRow[1]
for col = 1 to sourcePatchRow.count do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment