//public void GetEnvironmentCubemaps( out Component_Image environmentCubemap, out Component_Image irradianceCubemap )
        //{
        //	environmentCubemap = processedEnvironmentCubemap;
        //	irradianceCubemap = processedIrradianceCubemap;
        //}

        public override bool GetEnvironmentTextureData(out Component_RenderingPipeline.EnvironmentTextureData environmentCubemap, out Component_RenderingPipeline.EnvironmentTextureData irradianceCubemap)
        {
            var affect = (float)AffectLighting.Value;

            if (affect > 0)
            {
                Vector3F multiplier;
                Matrix3F rotation;
                if (LightingCubemap.ReferenceSpecified || LightingCubemap.Value != null)
                {
                    multiplier = LightingMultiplier.Value.ToVector3F();
                    GetLightingCubemapRotationMatrix(out rotation);
                }
                else
                {
                    multiplier = Multiplier.Value.ToVector3F() * LightingMultiplier.Value.ToVector3F();
                    GetRotationMatrix(out rotation);
                }

                if (processedEnvironmentCubemap != null)
                {
                    environmentCubemap = new Component_RenderingPipeline.EnvironmentTextureData(processedEnvironmentCubemap, affect, ref rotation, ref multiplier);
                }
                else
                {
                    environmentCubemap = new Component_RenderingPipeline.EnvironmentTextureData(ResourceUtility.GrayTextureCube, affect);
                }

                if (processedIrradianceCubemap != null)
                {
                    irradianceCubemap = new Component_RenderingPipeline.EnvironmentTextureData(processedIrradianceCubemap, affect, ref rotation, ref multiplier);
                }
                else
                {
                    irradianceCubemap = new Component_RenderingPipeline.EnvironmentTextureData(ResourceUtility.GrayTextureCube, affect);
                }

                return(true);
            }

            environmentCubemap = new Component_RenderingPipeline.EnvironmentTextureData();
            irradianceCubemap  = new Component_RenderingPipeline.EnvironmentTextureData();
            return(false);
        }
示例#2
0
        //public void GetEnvironmentCubemaps( out Component_Image environmentCubemap, out Component_Image irradianceCubemap )
        //{
        //	environmentCubemap = processedEnvironmentCubemap;
        //	irradianceCubemap = processedIrradianceCubemap;
        //}

        public override void GetEnvironmentTextureData(out Component_RenderingPipeline.EnvironmentTextureData environmentCubemap, out Component_RenderingPipeline.EnvironmentTextureData irradianceCubemap)
        {
            GetRotationMatrix(out var rotation);
            var multiplier = Multiplier.Value.ToVector3F() * MultiplierReflection.Value.ToVector3F();

            if (processedEnvironmentCubemap != null)
            {
                environmentCubemap = new Component_RenderingPipeline.EnvironmentTextureData(processedEnvironmentCubemap, ref rotation, ref multiplier);
            }
            else
            {
                environmentCubemap = new Component_RenderingPipeline.EnvironmentTextureData(ResourceUtility.GrayTextureCube);
            }

            if (processedIrradianceCubemap != null)
            {
                irradianceCubemap = new Component_RenderingPipeline.EnvironmentTextureData(processedIrradianceCubemap, ref rotation, ref multiplier);
            }
            else
            {
                irradianceCubemap = new Component_RenderingPipeline.EnvironmentTextureData(ResourceUtility.GrayTextureCube);
            }
        }
示例#3
0
        public abstract void Render(Component_RenderingPipeline pipeline, ViewportRenderingContext context, Component_RenderingPipeline.IFrameData frameData);          //, Viewport renderToViewport );// ref Component_Texture actualTexture );

        public abstract void GetEnvironmentTextureData(out Component_RenderingPipeline.EnvironmentTextureData environmentCubemap, out Component_RenderingPipeline.EnvironmentTextureData irradianceCubemap);