Skip to content

Commit

Permalink
rsx: Wrap MSAA coordinates before texelFetch
Browse files Browse the repository at this point in the history
  • Loading branch information
kd-11 committed Jul 4, 2023
1 parent f7e9622 commit 465c421
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ vec4 texelFetch2DMS(in _MSAA_SAMPLER_TYPE_ tex, const in vec2 sample_count, cons
vec4 sampleTexture2DMS(in _MSAA_SAMPLER_TYPE_ tex, const in vec2 coords, const in int index)
{
const uint flags = TEX_FLAGS(index);
const vec2 normalized_coords = COORD_SCALE2(index, coords);
const vec2 scaled_coords = COORD_SCALE2(index, coords);
const vec2 normalized_coords = mod(scaled_coords, vec2(1.0));
const vec2 sample_count = vec2(2., textureSamples(tex) * 0.5);
const vec2 image_size = textureSize(tex) * sample_count;
const ivec2 icoords = ivec2(normalized_coords * image_size);
Expand Down

0 comments on commit 465c421

Please sign in to comment.