uniform sampler2D m_SamplerY;
uniform sampler2D m_SamplerU;
uniform sampler2D m_SamplerV;

uniform mediump mat3 yuvCoeff;

// Y - 16, Cb - 128, Cr - 128
const mediump vec3 offsets = vec3(-0.0625, -0.5, -0.5);

lowp vec3 sampleRgb(vec2 loc) 
{
  lowp float y = texture2D(m_SamplerY, loc).r;
  lowp float u = texture2D(m_SamplerU, loc).r;
  lowp float v = texture2D(m_SamplerV, loc).r;
  return yuvCoeff * (vec3(y, u, v) + offsets);
}

uniform sampler2D m_SamplerY;
uniform sampler2D m_SamplerU;
uniform sampler2D m_SamplerV;

uniform mat3 yuvCoeff;

// Y - 16, Cb - 128, Cr - 128
const mediump vec3 offsets = vec3(-0.0625, -0.5, -0.5);

lowp vec3 sampleRgb(vec2 loc) 
{
  float y = texture2D(m_SamplerY, loc).r;
  float u = texture2D(m_SamplerU, loc).r;
  float v = texture2D(m_SamplerV, loc).r;
  return yuvCoeff * (vec3(y, u, v) + offsets);
}
--- 
+++ 
@@ -2,15 +2,15 @@
 uniform sampler2D m_SamplerU;
 uniform sampler2D m_SamplerV;
 
-uniform mat3 yuvCoeff;
+uniform mediump mat3 yuvCoeff;
 
 // Y - 16, Cb - 128, Cr - 128
 const mediump vec3 offsets = vec3(-0.0625, -0.5, -0.5);
 
 lowp vec3 sampleRgb(vec2 loc) 
 {
-  float y = texture2D(m_SamplerY, loc).r;
-  float u = texture2D(m_SamplerU, loc).r;
-  float v = texture2D(m_SamplerV, loc).r;
+  lowp float y = texture2D(m_SamplerY, loc).r;
+  lowp float u = texture2D(m_SamplerU, loc).r;
+  lowp float v = texture2D(m_SamplerV, loc).r;
   return yuvCoeff * (vec3(y, u, v) + offsets);
 }
Add precision prefixes to shaders

Co-Authored-By: Dan Balasescu <c9bd76907373126dff70d71f8b944159a669cbf1@smgi.me>