skia2/tests/sksl/shared/golden/Texture2D.glsl
John Stiles 47ee0caa10 Split Texture test into separate 1D and 2D tests.
This improves the test output for Metal. Previously, the Metal output
was just an error message, since 1D textures were unsupported. Now we
have a valid golden output for the 2D case in Metal. (1D is still
unsupported and is likely to remain unsupported; Skia currently has no
use case for 1D textures.)

Change-Id: I91977712030f08e371cc6bfb2afa578940ca00b7
Bug: skia:10797
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330940
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-11-02 14:39:31 +00:00

9 lines
201 B
GLSL

out vec4 sk_FragColor;
layout (binding = 0) uniform sampler2D tex;
void main() {
vec4 a = texture(tex, vec2(0.0));
vec4 b = textureProj(tex, vec3(0.0));
sk_FragColor = vec4(a.xy, b.zw);
}