Exemple #1
0
        public void Bind()
        {
            LightUniform currentLightUniform = Engine.UniformManager.GetUniform <LightUniform>("light");

            currentLightUniform.Color    = new Vector3(this.Color.R, this.Color.G, this.Color.B);
            currentLightUniform.Position = this.gameObject.Transform.Position;
            currentLightUniform.Set(Engine.RenderingPool.PhongShaderProgram);
        }
Exemple #2
0
        public void Bind(ShaderProgram shaderProgram, int lightNumber)
        {
            LightUniform currentLightUniform = Engine.UniformManager.GetUniform <LightUniform>("lights");

            currentLightUniform.Color    = new Vector3(this.Color.R, this.Color.G, this.Color.B);
            currentLightUniform.Position = this.gameObject.Transform.Position;
            currentLightUniform.Set(shaderProgram, lightNumber);
        }