mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Work around problem with clashing uniform precision in thin3d presets.
See #21904 Fixes #21904
This commit is contained in:
@@ -264,7 +264,11 @@ static ShaderModule *GenerateFShader(DrawContext *draw, FragmentShaderPreset pre
|
||||
const bool rbSwizzle = preset == FS_TEXTURE_COLOR_2D_RB_SWIZZLE;
|
||||
|
||||
fsWriter.DeclareSamplers(g_samplers);
|
||||
fsWriter.BeginFSMain(g_uniforms, texturing ? Slice(g_varyingsTex) : Slice(g_varyings));
|
||||
|
||||
// NOTE (first argument): We do not declare the uniforms here, as they aren't used in any of the preset shaders.
|
||||
// Declaring them currently causes a precision clash with some GLSL compilers, see issue #21904.
|
||||
// So if we need them in the future, that needs to be dealt with.
|
||||
fsWriter.BeginFSMain(Slice<UniformDef>::empty(), texturing ? Slice(g_varyingsTex) : Slice(g_varyings));
|
||||
if (texturing) {
|
||||
fsWriter.C("vec4 col = ");
|
||||
fsWriter.SampleTexture2D("tex", "oTexCoord0");
|
||||
|
||||
Reference in New Issue
Block a user