mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02:00
PixelShaderGen: Clamp texture layer when using manual texture sampling with stereoscopic 3D
Otherwise, texelFetch() will use an out-of-bounds layer for game textures (that have 1 layer; EFB copies have 2 layers in stereoscopic 3D mode), which is undefined behavior (often resulting in a black image). The fast texture sampling path uses texture(), which always clamps (see https://www.khronos.org/opengl/wiki/Array_Texture#Access_in_shaders), so it was unaffected by this difference.
This commit is contained in:
@ -42,7 +42,7 @@ ShaderHostConfig ShaderHostConfig::GetCurrent()
|
||||
bits.enable_validation_layer = g_ActiveConfig.bEnableValidationLayer;
|
||||
bits.manual_texture_sampling = !g_ActiveConfig.bFastTextureSampling;
|
||||
bits.manual_texture_sampling_custom_texture_sizes =
|
||||
g_ActiveConfig.ManualTextureSamplingWithHiResTextures();
|
||||
g_ActiveConfig.ManualTextureSamplingWithCustomTextureSizes();
|
||||
bits.backend_sampler_lod_bias = g_ActiveConfig.backend_info.bSupportsLodBiasInSampler;
|
||||
bits.backend_dynamic_vertex_loader = g_ActiveConfig.backend_info.bSupportsDynamicVertexLoader;
|
||||
bits.backend_vs_point_line_expand = g_ActiveConfig.UseVSForLinePointExpand();
|
||||
|
Reference in New Issue
Block a user