Saves up to 50% of RAM, ~4MB for normal size map with different textures in each patch. Also might increase performance both on CPU and GPU because of less memory consumption.
Also might slightly increase Atlas performance during painting.
Differential D3052
Moves terrain lighting calculation to GPU vladislavbelov on Nov 3 2020, 9:54 PM. Authored by
Details
Saves up to 50% of RAM, ~4MB for normal size map with different textures in each patch. Also might increase performance both on CPU and GPU because of less memory consumption. Also might slightly increase Atlas performance during painting.
Diff Detail
Event TimelineComment Actions Successful build - Chance fights ever on the side of the prudent. builderr-debug-macos.txt ../../../source/simulation2/scripting/JSInterface_Simulation.cpp:155:4: warning: suggest braces around initialization of subobject [-Wmissing-braces] CFixedVector2D(-halfSize.X, -halfSize.Y), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. builderr-release-macos.txt /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libnetwork.a(precompiled.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblobby.a(precompiled.o) has no symbols ../../../source/simulation2/scripting/JSInterface_Simulation.cpp:155:4: warning: suggest braces around initialization of subobject [-Wmissing-braces] CFixedVector2D(-halfSize.X, -halfSize.Y), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libsimulation2.a(precompiled.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine.a(precompiled.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics.a(precompiled.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libatlas.a(precompiled.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgui.a(precompiled.o) has no symbols Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1706/display/redirect Comment Actions I agree that the reduction in RAM probably offsets the added computation. Seems a bit of a no-brainer. On my mac this looks good in both GLSL and ARB. Comment Actions Tested on Windows with no issue
Comment Actions Precomputed light - yes, but GetLightEnv() also stores useful information, like sun color and direction. So it can't be removed completely, only moved somewhere else. |