示例#1
0
        static void InitTextures()
        {
            SM3DWCubemapLoader.LoadCubemap();

            NoiseTexture       = GLTexture2D.FromBitmap(Resources.white);
            AlbedoLayerTexture = GLTexture2D.FromBitmap(Resources.white);
            HeightTexture      = GLTexture2D.FromBitmap(Resources.black);
            AlphaProjTexture   = GLTexture2D.FromBitmap(Resources.black);
            MultiTextureMask   = GLTexture2D.FromBitmap(Resources.black);
            IndirectTexture    = GLTexture2D.FromBitmap(Resources.black);
        }
示例#2
0
        public void LoadEngineTextures(ShaderProgram shader, int id)
        {
            var mat = MaterialData as FMAT;

            id++;

            //BindTexture(shader, NoiseTexture, 5, id++);
            BindTexture(shader, SM3DWCubemapLoader.GetCubemap(mat), 6, id++);
            BindTextureVertex(shader, SM3DWCubemapLoader.GetIrradianceCubemap(), 7, id++);

            BindTexture(shader, HeightTexture, 8, id++);

            BindTexture(shader, AlbedoLayerTexture, GetSamplerID("_a1"), id++);
            BindTexture(shader, HeightTexture, GetSamplerID("_h0"), id++);
            BindTexture(shader, NoiseTexture, GetSamplerID("_noise"), id++);
            BindTexture(shader, MultiTextureMask, GetSamplerID("_mt0"), id++);
            BindTexture(shader, IndirectTexture, GetSamplerID("_r0"), id++);
            BindTexture(shader, IndirectTexture, 25, id++);
        }