Gamma adjustment
by Ronald J Nelson · in Torque Game Engine Advanced · 02/25/2008 (8:47 pm) · 2 replies
Just a quick question. In TGE there was a gamma correction setting in the options GUI that is not in TGEA. Is there any way to do this with TGEA?
#2
02/26/2008 (4:50 pm)
Yeah I tried it and it didn't work. It is probably due to the DirectX to OpenGL differences.
Torque Owner James Laker (BurNinG)
In platformVideo.cpp try uncommenting it and moving the variables above the function.
static F32 sgOriginalGamma = -1.0; static F32 sgGammaCorrection = 0.0; ConsoleFunction(videoSetGammaCorrection, void, 2, 2, "setGammaCorrection(gamma);") { argc; F32 g = mClampF(dAtof(argv[1]),0.0,1.0); F32 d = -(g - 0.5); if (d != sgGammaCorrection && (sgOriginalGamma != -1.0 || Video::getGammaCorrection(sgOriginalGamma))) Video::setGammaCorrection(sgOriginalGamma+d); sgGammaCorrection = d; }Havent tested it... at work. I'll play with it again when I get home.