From 53599592e09edd215bfa1eaa7e6f3a9f3fc50ae6 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 22 Mar 2019 09:55:03 +0100 Subject: Introduce the Qt graphics abstraction as private QtGui helpers Comes with backends for Vulkan, Metal, Direct3D 11.1, and OpenGL (ES). All APIs are private for now. Shader conditioning (i.e. generating a QRhiShader in memory or on disk from some shader source code) is done via the tools and APIs provided by qt-labs/qtshadertools. The OpenGL support follows the cross-platform tradition of requiring ES 2.0 only, while optionally using some (ES) 3.x features. It can operate in core profile contexts as well. Task-number: QTBUG-70287 Change-Id: I246f2e36d562e404012c05db2aa72487108aa7cc Reviewed-by: Lars Knoll --- tests/manual/rhi/shared/texture_ms4.frag | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/manual/rhi/shared/texture_ms4.frag (limited to 'tests/manual/rhi/shared/texture_ms4.frag') diff --git a/tests/manual/rhi/shared/texture_ms4.frag b/tests/manual/rhi/shared/texture_ms4.frag new file mode 100644 index 0000000000..d4f2bd3654 --- /dev/null +++ b/tests/manual/rhi/shared/texture_ms4.frag @@ -0,0 +1,20 @@ +#version 440 + +layout(location = 0) in vec2 v_texcoord; + +layout(location = 0) out vec4 fragColor; + +layout(std140, binding = 0) uniform buf { + mat4 mvp; + int flip; +} ubuf; + +layout(binding = 1) uniform sampler2DMS tex; + +void main() +{ + ivec2 tc = ivec2(floor(vec2(textureSize(tex)) * v_texcoord)); + vec4 c = texelFetch(tex, tc, 0) + texelFetch(tex, tc, 1) + texelFetch(tex, tc, 2) + texelFetch(tex, tc, 3); + c /= 4.0; + fragColor = vec4(c.rgb * c.a, c.a); +} -- cgit v1.2.3