skia2/tests/sksl/shared/golden/TextureSharpen.glsl
Brian Osman 034f78a466 Detect non-2D textures in MetalCodeGenerator and fail cleanly
We were letting this get further, then asserting.

Bug: skia:10797
Change-Id: Iff6fe43aa32450b5a517c94773031d593f1f62a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321794
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-02 20:36:04 +00:00

12 lines
351 B
GLSL

out vec4 sk_FragColor;
layout (binding = 0) uniform sampler1D one;
layout (binding = 1) uniform sampler2D two;
void main() {
vec4 a = texture(one, 0.0, -0.5);
vec4 b = texture(two, vec2(0.0), -0.5);
vec4 c = textureProj(one, vec2(0.0), -0.5);
vec4 d = textureProj(two, vec3(0.0), -0.5);
sk_FragColor = vec4(a.x, b.x, c.x, d.x);
}