Lines Matching full:vec4
50 using tcu::Vec4;
69 static tcu::Vector<T, 4> castVectorSaturate (const tcu::Vec4& in)
85 "in highp vec4 a_position;\n"
93 "uniform highp vec4 u_color;\n"
103 void FlatColorShader::setColor (sglr::Context& context, deUint32 program, const tcu::Vec4& color)
123 const tcu::Vec4 color (m_uniforms[0].value.f4);
161 "in highp vec4 a_position;\n"
162 "in highp vec4 a_coord;\n"
163 "out highp vec4 v_coord;\n"
172 "in highp vec4 v_coord;\n"
173 "uniform highp vec4 u_gradientMin;\n"
174 "uniform highp vec4 u_gradientMax;\n"
182 " highp vec4 fv = vec4(f0, f1, 1.0f-f0, 1.0f-f1);\n"
189 void GradientShader::setGradient (sglr::Context& ctx, deUint32 program, const tcu::Vec4& gradientMin, const tcu::Vec4& gradientMax)
209 const tcu::Vec4 gradientMin(m_uniforms[0].value.f4);
210 const tcu::Vec4 gradientMax(m_uniforms[1].value.f4);
215 const tcu::Vec4 coord = rr::readTriangleVarying<float>(packets[packetNdx], context, 0, fragNdx);
220 const tcu::Vec4 fv = Vec4(f0, f1, 1.0f-f0, 1.0f-f1);
222 const tcu::Vec4 color = gradientMin + (gradientMax-gradientMin) * fv;
247 src << "uniform " << precision << " vec4 u_texScale" << samplerNdx << ";\n";
248 src << "uniform " << precision << " vec4 u_texBias" << samplerNdx << ";\n";
252 src << "uniform " << precision << " vec4 u_outScale0;\n"
253 << "uniform " << precision << " vec4 u_outBias0;\n";
258 << " " << precision << " vec4 out0 = vec4(0.0);\n";
262 src << "\tout0 += vec4("
284 "in highp vec4 a_position;\n"
307 Texture2DShader::Texture2DShader (const DataTypes& samplerTypes, glu::DataType outputType, const Vec4& outScale, const Vec4& outBias)
319 m_inputs[ndx].scale = Vec4(1.0f);
320 m_inputs[ndx].bias = Vec4(0.0f);
329 void Texture2DShader::setTexScaleBias (int inputNdx, const Vec4& scale, const Vec4& bias)
335 void Texture2DShader::setOutScaleBias (const Vec4& scale, const Vec4& bias)
373 const tcu::Vec4 outScale (m_uniforms[0].value.f4);
374 const tcu::Vec4 outBias (m_uniforms[1].value.f4);
377 tcu::Vec4 colors[4];
384 const tcu::Vec4 coord = rr::readTriangleVarying<float>(packets[packetNdx], context, 0, fragNdx);
390 colors[fragNdx] = tcu::Vec4(0.0f);
396 const tcu::Vec4 scale (m_uniforms[2 + ndx*3 + 1].value.f4);
397 const tcu::Vec4 bias (m_uniforms[2 + ndx*3 + 2].value.f4);
398 tcu::Vec4 tmpColors[4];
409 const tcu::Vec4 color = colors[fragNdx] * outScale + outBias;
434 "in highp vec4 a_position;\n"
447 "uniform highp vec4 u_scale;\n"
448 "uniform highp vec4 u_bias;\n"
453 " o_color = " + glu::getDataTypeName(outputType) + "(vec4(texture(u_sampler0, v_coord)) * u_scale + u_bias);\n"
494 void TextureCubeShader::setTexScaleBias (const Vec4& scale, const Vec4& bias)
521 packet.outputs[0] = tcu::Vec4(v_coord.x(), v_coord.y(), v_coord.z(), 0.0f);
527 const tcu::Vec4 texScale (m_uniforms[2].value.f4);
528 const tcu::Vec4 texBias (m_uniforms[3].value.f4);
531 tcu::Vec4 colors[4];
539 const tcu::Vec4 coord = rr::readTriangleVarying<float>(packets[packetNdx], context, 0, fragNdx);
547 const tcu::Vec4 color = colors[fragNdx] * texScale + texBias;
572 "in highp vec4 a_position;\n"
584 "uniform highp vec4 u_scale;\n"
585 "uniform highp vec4 u_bias;\n"
591 " o_color = " + glu::getDataTypeName(outputType) + "(vec4(texture(u_sampler0, vec3(v_coord, u_layer))) * u_scale + u_bias);\n"
605 void Texture2DArrayShader::setTexScaleBias (const Vec4& scale, const Vec4& bias)
634 const tcu::Vec4 texScale (m_uniforms[1].value.f4);
635 const tcu::Vec4 texBias (m_uniforms[2].value.f4);
639 tcu::Vec4 colors[4];
647 const tcu::Vec4 coord = rr::readTriangleVarying<float>(packets[packetNdx], context, 0, fragNdx);
655 const tcu::Vec4 color = colors[fragNdx] * texScale + texBias;
680 "in highp vec4 a_position;\n"
692 "uniform highp vec4 u_scale;\n"
693 "uniform highp vec4 u_bias;\n"
699 " o_color = " + glu::getDataTypeName(outputType) + "(vec4(texture(u_sampler0, vec3(v_coord, u_depth))) * u_scale + u_bias);\n"
713 void Texture3DShader::setTexScaleBias (const Vec4& scale, const Vec4& bias)
742 const tcu::Vec4 texScale (m_uniforms[1].value.f4);
743 const tcu::Vec4 texBias (m_uniforms[2].value.f4);
747 tcu::Vec4 colors[4];
755 const tcu::Vec4 coord = rr::readTriangleVarying<float>(packets[packetNdx], context, 0, fragNdx);
763 const tcu::Vec4 color = colors[fragNdx] * texScale + texBias;
787 "in highp vec4 a_position;\n"
788 "in highp vec4 a_coord;\n"
789 "out highp vec4 v_coord;\n"
798 "in highp vec4 v_coord;\n"
801 "uniform highp vec4 u_color;\n"
818 void DepthGradientShader::setUniforms (sglr::Context& ctx, deUint32 program, const float gradientMin, const float gradientMax, const tcu::Vec4& color)
841 const tcu::Vec4 color (u_color.value.f4);
851 const tcu::Vec4 coord = rr::readTriangleVarying<float>(packets[packetNdx], context, 0, fragNdx);
866 void clearColorBuffer (sglr::Context& ctx, const tcu::TextureFormat& format, const tcu::Vec4& value)
891 void readPixels (sglr::Context& ctx, tcu::Surface& dst, int x, int y, int width, int height, const tcu::TextureFormat& format, const tcu::Vec4& scale, const tcu::Vec4& bias)