From e86628884b65b47048cf46eebf3dd80c5d40a9d7 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Thu, 10 Oct 2019 13:04:16 +0100 Subject: [PATCH] comp: Add disabled shader debugging code --- src/xrt/compositor/shaders/mesh.frag | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/xrt/compositor/shaders/mesh.frag b/src/xrt/compositor/shaders/mesh.frag index 2248808d7..21656d95a 100644 --- a/src/xrt/compositor/shaders/mesh.frag +++ b/src/xrt/compositor/shaders/mesh.frag @@ -34,5 +34,17 @@ layout (location = 0) out vec4 outColor; void main() { vec3 color = texture(texSampler, inUV).xyz; - outColor = vec4(color,1.0); + +#if 0 + if (inUV.x < 0.0 || inUV.x > 1.0 || inUV.y < 0.0 || inUV.y > 1.0) { + color = vec3(1.0, 0.0, 1.0); + } else { + float t = floor(inUV.x * 16) + floor(inUV.y * 16); + bool isEven = mod(t, 2.0) == 0.0; + // color = color * float(isEven); + color = vec3(isEven, isEven, isEven); + } +#endif + + outColor = vec4(color, 1.0); }