Esempio n. 1
0
        private void PrefilterCubeMap()
        {
            if (!shouldPrefilter)
            {
                return;
            }

            if (useComputeShader)
            {
                lamberFilter.HarmonicOrder = 5;
                lamberFilter.RadianceMap   = inputCubemap;
                lamberFilter.Draw();
                renderSHEffect.InputSH = lamberFilter.PrefilteredLambertianSH;
            }
            else
            {
                lamberFilterNoCompute.HarmonicOrder = 5;
                lamberFilterNoCompute.RadianceMap   = inputCubemap;
                lamberFilterNoCompute.Draw();
                renderSHEffect.InputSH = lamberFilterNoCompute.PrefilteredLambertianSH;
            }

            renderSHEffect.SetOutput(outputCubemap);
            renderSHEffect.Draw();
        }
        private void PrefilterCubeMap()
        {
            if (!shouldPrefilter)
            {
                return;
            }

            lamberFilter.HarmonicOrder = 5;
            lamberFilter.RadianceMap   = inputCubemap;
            lamberFilter.Draw();

            renderSHEffect.InputSH = lamberFilter.PrefilteredLambertianSH;
            renderSHEffect.SetOutput(outputCubemap);
            renderSHEffect.Draw();
        }