Exemplo n.º 1
0
        private static Number4 GetColor(SamplerState samplerState, ITextureMipMap mipMap, ref Number4 texCoords)
        {
            if (!GetTextureAddress(texCoords.Int0, mipMap.Width, samplerState.AddressU, out texCoords.Int0))
            {
                return(samplerState.BorderColor);
            }
            if (!GetTextureAddress(texCoords.Int1, mipMap.Height, samplerState.AddressV, out texCoords.Int1))
            {
                return(samplerState.BorderColor);
            }

            return(mipMap.GetData(ref texCoords));
        }
Exemplo n.º 2
0
        private static Number4 GetColor(SamplerState samplerState, ITextureMipMap mipMap, ref Number4 texCoords)
        {
            if (!GetTextureAddress(texCoords.Int0, mipMap.Width, samplerState.AddressU, out texCoords.Int0))
                return samplerState.BorderColor;
            if (!GetTextureAddress(texCoords.Int1, mipMap.Height, samplerState.AddressV, out texCoords.Int1))
                return samplerState.BorderColor;

            return mipMap.GetData(ref texCoords);
        }