Lines Matching refs:minVal
667 static inline float linearInterpolate (float t, float minVal, float maxVal)
669 return minVal + (maxVal - minVal) * t;
795 static void fillWithComponentGradients1D (const PixelBufferAccess& access, const Vec4& minVal, const Vec4& maxVal)
802 float r = linearInterpolate(s, minVal.x(), maxVal.x());
803 float g = linearInterpolate(s, minVal.y(), maxVal.y());
804 float b = linearInterpolate(s, minVal.z(), maxVal.z());
805 float a = linearInterpolate(s, minVal.w(), maxVal.w());
811 minVal, const Vec4& maxVal)
820 float r = linearInterpolate(( s + t) *0.5f, minVal.x(), maxVal.x());
821 float g = linearInterpolate(( s + (1.0f-t))*0.5f, minVal.y(), maxVal.y());
822 float b = linearInterpolate(((1.0f-s) + t) *0.5f, minVal.z(), maxVal.z());
823 float a = linearInterpolate(((1.0f-s) + (1.0f-t))*0.5f, minVal.w(), maxVal.w());
830 static void fillWithComponentGradients3D (const PixelBufferAccess& dst, const Vec4& minVal, const Vec4& maxVal)
842 float r = linearInterpolate(s, minVal.x(), maxVal.x());
843 float g = linearInterpolate(t, minVal.y(), maxVal.y());
844 float b = linearInterpolate(p, minVal.z(), maxVal.z());
845 float a = linearInterpolate(1.0f - (s+t+p)/3.0f, minVal.w(), maxVal.w());
853 void fillWithComponentGradients (const PixelBufferAccess& access, const Vec4& minVal, const Vec4& maxVal)
864 fillWithComponentGradients(getEffectiveDepthStencilAccess(access, tcu::Sampler::MODE_DEPTH), minVal, maxVal);
866 fillWithComponentGradients(getEffectiveDepthStencilAccess(access, tcu::Sampler::MODE_STENCIL), minVal.swizzle(3,2,1,0), maxVal.swizzle(3,2,1,0));
871 fillWithComponentGradients1D(access, minVal, maxVal);
873 fillWithComponentGradients2D(access, minVal, maxVal);
875 fillWithComponentGradients3D(access, minVal, maxVal);
1135 void estimatePixelValueRange (const ConstPixelBufferAccess& access, Vec4& minVal, Vec4& maxVal)
1143 minVal = Vec4(0.0f);
1149 minVal = Vec4(-1.0f);
1155 minVal = Vec4(std::numeric_limits<float>::max());
1166 minVal[0] = (deFloatIsNaN(p[0]) ? minVal[0] : de::min(minVal[0], p[0]));
1167 minVal[1] = (deFloatIsNaN(p[1]) ? minVal[1] : de::min(minVal[1], p[1]));
1168 minVal[2] = (deFloatIsNaN(p[2]) ? minVal[2] : de::min(minVal[2], p[2]));
1169 minVal[3] = (deFloatIsNaN(p[3]) ? minVal[3] : de::min(minVal[3], p[3]));
1184 Vec4 minVal, maxVal;
1185 estimatePixelValueRange(access, minVal, maxVal);
1191 if (maxVal[c] - minVal[c] < eps)
1194 bias[c] = (c == 3) ? (1.0f - maxVal[c]*scale[c]) : (0.0f - minVal[c]*scale[c]);
1198 scale[c] = 1.0f / (maxVal[c] - minVal[c]);
1199 bias[c] = 0.0f - minVal[c]*scale[c];