Beispiel #1
0
        void    LoadHDRImage()
        {
//			m_HDRImage.Load( new System.IO.FileInfo( @".\Images\grace-new.hdr" ) );
            m_HDRImage.Load(new System.IO.FileInfo(@".\Images\ennis_1024x512.hdr"));
            ImageUtility.ImagesMatrix badImages = new ImageUtility.ImagesMatrix(new ImageUtility.ImageFile[, ] {
                { m_HDRImage }
            });
            ImageUtility.ImagesMatrix images = new ImageUtility.ImagesMatrix();
            images.ConvertFrom(badImages, ImageUtility.PIXEL_FORMAT.RGBA32F, badImages.ColorProfile);


            m_Tex_HDREnvironment = new Texture2D(m_device, images, ImageUtility.COMPONENT_FORMAT.AUTO);

//          ImageUtility.ImageFile	tempLDRImage = new ImageUtility.ImageFile();
//          tempLDRImage.ToneMapFrom( m_HDRImage, ( float3 _HDR, ref float3 _LDR ) => {
//              _LDR = _HDR;
//          } );
//          graphPanel.Bitmap = tempLDRImage.AsBitmap;

            // Integrate SH
//			EncodeSH();
//			EncodeSH_20Orders();

            // Test numerical integration
//			NumericalIntegration();
//			NumericalIntegration_20Orders();
            TestIntegral();
        }