mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Fix validation errors with unnormalized samplers
When using samplers with unnormalized coordinates in Vulkan, the shaders must specify the LOD explicitly.
This commit is contained in:
parent
63f6778910
commit
bdd715ee5c
4 changed files with 19 additions and 18 deletions
|
@ -48,17 +48,17 @@ const uint32_t postprocess_frag_spv[] = {
|
||||||
0x00000012,0x00000023,0x0000000f,0x00000022,0x0004003d,0x00000006,0x00000024,0x00000023,
|
0x00000012,0x00000023,0x0000000f,0x00000022,0x0004003d,0x00000006,0x00000024,0x00000023,
|
||||||
0x000500ba,0x00000026,0x00000027,0x00000024,0x00000025,0x000300f7,0x00000029,0x00000000,
|
0x000500ba,0x00000026,0x00000027,0x00000024,0x00000025,0x000300f7,0x00000029,0x00000000,
|
||||||
0x000400fa,0x00000027,0x00000028,0x00000042,0x000200f8,0x00000028,0x0004003d,0x0000002e,
|
0x000400fa,0x00000027,0x00000028,0x00000042,0x000200f8,0x00000028,0x0004003d,0x0000002e,
|
||||||
0x00000031,0x00000030,0x0004003d,0x00000007,0x00000032,0x00000009,0x00050057,0x0000002a,
|
0x00000031,0x00000030,0x0004003d,0x00000007,0x00000032,0x00000009,0x00070058,0x0000002a,
|
||||||
0x00000033,0x00000031,0x00000032,0x0008004f,0x00000034,0x00000035,0x00000033,0x00000033,
|
0x00000033,0x00000031,0x00000032,0x00000002,0x00000025,0x0008004f,0x00000034,0x00000035,
|
||||||
0x00000000,0x00000001,0x00000002,0x0005008e,0x00000034,0x00000037,0x00000035,0x00000036,
|
0x00000033,0x00000033,0x00000000,0x00000001,0x00000002,0x0005008e,0x00000034,0x00000037,
|
||||||
0x00050041,0x00000012,0x00000039,0x0000000f,0x00000038,0x0004003d,0x00000006,0x0000003a,
|
0x00000035,0x00000036,0x00050041,0x00000012,0x00000039,0x0000000f,0x00000038,0x0004003d,
|
||||||
0x00000039,0x00060050,0x00000034,0x0000003b,0x0000003a,0x0000003a,0x0000003a,0x0007000c,
|
0x00000006,0x0000003a,0x00000039,0x00060050,0x00000034,0x0000003b,0x0000003a,0x0000003a,
|
||||||
0x00000034,0x0000003c,0x00000001,0x0000001a,0x00000037,0x0000003b,0x00050051,0x00000006,
|
0x0000003a,0x0007000c,0x00000034,0x0000003c,0x00000001,0x0000001a,0x00000037,0x0000003b,
|
||||||
0x0000003e,0x0000003c,0x00000000,0x00050051,0x00000006,0x0000003f,0x0000003c,0x00000001,
|
0x00050051,0x00000006,0x0000003e,0x0000003c,0x00000000,0x00050051,0x00000006,0x0000003f,
|
||||||
0x00050051,0x00000006,0x00000040,0x0000003c,0x00000002,0x00070050,0x0000002a,0x00000041,
|
0x0000003c,0x00000001,0x00050051,0x00000006,0x00000040,0x0000003c,0x00000002,0x00070050,
|
||||||
0x0000003e,0x0000003f,0x00000040,0x0000003d,0x0003003e,0x0000002c,0x00000041,0x000200f9,
|
0x0000002a,0x00000041,0x0000003e,0x0000003f,0x00000040,0x0000003d,0x0003003e,0x0000002c,
|
||||||
0x00000029,0x000200f8,0x00000042,0x0004003d,0x0000002e,0x00000043,0x00000030,0x0004003d,
|
0x00000041,0x000200f9,0x00000029,0x000200f8,0x00000042,0x0004003d,0x0000002e,0x00000043,
|
||||||
0x00000007,0x00000044,0x00000009,0x00050057,0x0000002a,0x00000045,0x00000043,0x00000044,
|
0x00000030,0x0004003d,0x00000007,0x00000044,0x00000009,0x00070058,0x0000002a,0x00000045,
|
||||||
0x0003003e,0x0000002c,0x00000045,0x000200f9,0x00000029,0x000200f8,0x00000029,0x000100fd,
|
0x00000043,0x00000044,0x00000002,0x00000025,0x0003003e,0x0000002c,0x00000045,0x000200f9,
|
||||||
0x00010038
|
0x00000029,0x000200f8,0x00000029,0x000100fd,0x00010038
|
||||||
};
|
};
|
|
@ -148,6 +148,7 @@ const uint32_t world_warp_frag_spv[] = {
|
||||||
0x000000b0,0x0004003d,0x00000007,0x000000b3,0x00000009,0x00050083,0x00000007,0x000000b6,
|
0x000000b0,0x0004003d,0x00000007,0x000000b3,0x00000009,0x00050083,0x00000007,0x000000b6,
|
||||||
0x000000b3,0x000000b5,0x0008000c,0x00000007,0x000000b7,0x00000001,0x0000002b,0x000000b1,
|
0x000000b3,0x000000b5,0x0008000c,0x00000007,0x000000b7,0x00000001,0x0000002b,0x000000b1,
|
||||||
0x000000b2,0x000000b6,0x0003003e,0x00000024,0x000000b7,0x0004003d,0x000000bb,0x000000be,
|
0x000000b2,0x000000b6,0x0003003e,0x00000024,0x000000b7,0x0004003d,0x000000bb,0x000000be,
|
||||||
0x000000bd,0x0004003d,0x00000007,0x000000bf,0x00000024,0x00050057,0x00000017,0x000000c0,
|
0x000000bd,0x0004003d,0x00000007,0x000000bf,0x00000024,0x00070058,0x00000017,0x000000c0,
|
||||||
0x000000be,0x000000bf,0x0003003e,0x000000b9,0x000000c0,0x000100fd,0x00010038
|
0x000000be,0x000000bf,0x00000002,0x00000043,0x0003003e,0x000000b9,0x000000c0,0x000100fd,
|
||||||
|
0x00010038
|
||||||
};
|
};
|
|
@ -24,10 +24,10 @@ void main()
|
||||||
if (pc.postprocess > 0.0)
|
if (pc.postprocess > 0.0)
|
||||||
{
|
{
|
||||||
//gamma + color intensity bump
|
//gamma + color intensity bump
|
||||||
fragmentColor = vec4(pow(texture(sTexture, unnormTexCoord).rgb * 1.5, vec3(pc.gamma)), 1.0);
|
fragmentColor = vec4(pow(textureLod(sTexture, unnormTexCoord, 0.0).rgb * 1.5, vec3(pc.gamma)), 1.0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fragmentColor = texture(sTexture, unnormTexCoord);
|
fragmentColor = textureLod(sTexture, unnormTexCoord, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,5 +51,5 @@ void main()
|
||||||
|
|
||||||
uv = clamp(uv * scrSize, vec2(0.0, 0.0), scrSize - vec2(0.5, 0.5));
|
uv = clamp(uv * scrSize, vec2(0.0, 0.0), scrSize - vec2(0.5, 0.5));
|
||||||
|
|
||||||
fragmentColor = texture(sTexture, uv);
|
fragmentColor = textureLod(sTexture, uv, 0.0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue