Example #1
0
        protected void BaseLightPass(StandardMaterialBase material, Renderer renderer, Light light)
        {
            m_EPSpecularLightColor.SetValue(material.SpecularColor.ToVector3());
            m_EPSpecularPower.SetValue(material.Shininess);
            m_EPSpecularIntensity.SetValue(material.SpecularIntensity);
            m_EPLightColor.SetValue(light._color);
            m_EPLightDirection.SetValue(light.Direction);
            m_EPLightPosition.SetValue(light._transform.LocalPosition);
            m_EPLightSpotAngle.SetValue(light.Angle);
            m_EPLightIntensity.SetValue(light.Intensity);
            m_EPLightRange.SetValue(light.Radius);
            m_EPLightFallOff.SetValue(light.FallOf);
            m_EPLightType.SetValue((int)light.TypeLight);

#if !DESKTOP
            m_EPFogColor.SetValue(Scene.current.RenderSettings.fogColor);
            m_EPFogData.SetValue(Scene.current.RenderSettings.fogData);
#endif
            m_EPShadowStrength.SetValue(light._shadowGenerator.ShadowStrength);
            m_EPShadowBias.SetValue(light._shadowGenerator.ShadowBias);
            m_EPShadowMap.SetValue(light._shadowGenerator.ShadowMap);
            m_EPShadowEnabled.SetValue(renderer.ReceiveShadow);
            m_EPLightView.SetValue(light._viewMatrix);
            m_EPLightProjection.SetValue(light._projectionMatrix);
            m_EPSpecularTextureEnabled.SetValue(material.SpecularTexture != null);
            m_EPSpecularTexture.SetValue(material.SpecularTexture);
            m_PassLight.Apply();
        }
Example #2
0
 protected void BasePass(StandardMaterialBase material, Renderer renderable)
 {
     m_EPWorld.SetValue(renderable.Transform._worldMatrix);
     m_EPTextureTilling.SetValue(material.Tiling);
     m_EPDiffuseColor.SetValue(material._diffuseColor);
     m_EPMainTexture.SetValue(material.MainTexture);
     m_PassAmbient.Apply();
 }