Ejemplo n.º 1
0
 private void inMatId_ValueChanged(object sender, EventArgs e)
 {
     material              = view.materials[inMatId.Value];
     inMatColorR.Text      = material.color.X.ToString();
     inMatColorG.Text      = material.color.Y.ToString();
     inMatColorB.Text      = material.color.Z.ToString();
     inMatLC1.Text         = material.lightCoeffs.X.ToString();
     inMatLC2.Text         = material.lightCoeffs.Y.ToString();
     inMatLC3.Text         = material.lightCoeffs.Z.ToString();
     inMatLC4.Text         = material.lightCoeffs.W.ToString();
     inMatReflect.Text     = (material.reflectionPercent * 100).ToString();
     inMatRefract.Text     = (material.refractionPercent * 100).ToString();
     inMatRefractCoef.Text = material.refractionCoef.ToString();
 }
Ejemplo n.º 2
0
        public void ReSendMaterial(SMaterial material)
        {
            int id = materials.FindIndex(x => x == material);

            materials[id].SendToShader(basicProgramID, "materials[" + id + "]");
        }