mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Fix OpenGLES 3.0 on Qualcomm's crappy driver, it can't bitshift sometimes.
[fixed lint issues and grammar ~comex]
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "VideoCommon/ConstantManager.h"
|
||||
#include "VideoCommon/DriverDetails.h"
|
||||
#include "VideoCommon/NativeVertexFormat.h"
|
||||
#include "VideoCommon/ShaderGenCommon.h"
|
||||
#include "VideoCommon/XFMemory.h"
|
||||
@ -250,7 +251,10 @@ static void GenerateLightingShader(T& object, LightingUidData& uid_data, int com
|
||||
}
|
||||
}
|
||||
object.Write("lacc = clamp(lacc, 0, 255);\n");
|
||||
object.Write("%s%d = float4((mat * (lacc + (lacc >> 7))) >> 8) / 255.0;\n", dest, j);
|
||||
if (DriverDetails::HasBug(DriverDetails::BUG_BROKENIVECSHIFTS))
|
||||
object.Write("%s%d = float4(irshift((mat * (lacc + irshift(lacc, 7))), 8)) / 255.0;\n", dest, j);
|
||||
else
|
||||
object.Write("%s%d = float4((mat * (lacc + (lacc >> 7))) >> 8) / 255.0;\n", dest, j);
|
||||
object.Write("}\n");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user