Lines Matching refs:maxVal
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 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)
1144 maxVal = Vec4(1.0f);
1150 maxVal = Vec4(+1.0f);
1156 maxVal = Vec4(std::numeric_limits<float>::min());
1171 maxVal[0] = (deFloatIsNaN(p[0]) ? maxVal[0] : de::max(maxVal[0], p[0]));
1172 maxVal[1] = (deFloatIsNaN(p[1]) ? maxVal[1] : de::max(maxVal[1], p[1]));
1173 maxVal[2] = (deFloatIsNaN(p[2]) ? maxVal[2] : de::max(maxVal[2], p[2]));
1174 maxVal[3] = (deFloatIsNaN(p[3]) ? maxVal[3] : de::max(maxVal[3], p[3]));
1184 Vec4 minVal, maxVal;
1185 estimatePixelValueRange(access, minVal, maxVal);
1191 if (maxVal[c] - minVal[c] < eps)
1193 scale[c] = (maxVal[c] < eps) ? 1.0f : (1.0f / maxVal[c]);
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]);
1228 const float maxVal = (float)(((1<<mBits) - 1) * (1<<(eMax-eBias))) / (float)(1<<mBits);
1230 float rc = deFloatClamp(color[0], 0.0f, maxVal);
1231 float gc = deFloatClamp(color[1], 0.0f, maxVal);
1232 float bc = deFloatClamp(color[2], 0.0f, maxVal);