Skip to content
Snippets Groups Projects
Commit 80ea4f38 authored by DarkGod's avatar DarkGod
Browse files

Try to fix the gamma issue on some computers

parent 57983668
No related branches found
No related tags found
No related merge requests found
......@@ -648,12 +648,16 @@ end
-- By default it uses SDL gamma settings, but it can also use a fullscreen shader if available
-- @param gamma
function _M:setGamma(gamma)
if self.support_shader_gamma and self.full_fbo_shader then
-- Tell the shader which gamma to use
self.full_fbo_shader:setUniform("gamma", gamma)
-- Remove SDL gamma correction
core.display.setGamma(1)
print("[GAMMA] Setting gamma correction using fullscreen shader", gamma)
if self.support_shader_gamma and core.shader.active() then
if self.full_fbo_shader then
-- Tell the shader which gamma to use
self.full_fbo_shader:setUniform("gamma", gamma)
-- Remove SDL gamma correction
core.display.setGamma(1)
print("[GAMMA] Setting gamma correction using fullscreen shader", gamma)
else
print("[GAMMA] Not setting gamma correction yet, no fullscreen shader found", gamma)
end
else
core.display.setGamma(gamma)
print("[GAMMA] Setting gamma correction using SDL", gamma)
......
......@@ -143,7 +143,7 @@ game = false
-- Setup resolution
engine.Game:setResolution(config.settings.window.size, true)
core.display.setTextBlended(config.settings.aa_text)
core.display.setGamma(config.settings.gamma_correction / 100)
-- core.display.setGamma(config.settings.gamma_correction / 100)
if not config.settings.fbo_active then core.display.disableFBO() print("Disabling FBO") end
if not config.settings.shaders_active then core.shader.disable() print("Disabling Shaders") end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment