public virtual void SetMaterialUniforms(ShaderProgram shader, STGenericMaterial material, STGenericMesh mesh)
        {
            shader.SetColor("diffuseColor", STColor8.White.Color);
            if (material == null)
            {
                return;
            }

            shader.SetColor("diffuseColor", material.DiffuseColor.Color);
        }
 private void SetRenderSettings(ShaderProgram shader)
 {
     shader.SetInt("renderType", (int)Runtime.DebugRendering);
     shader.SetBoolToInt("hasDiffuse", false);
     shader.SetInt("selectedBoneIndex", Runtime.SelectedBoneIndex);
     shader.SetBoolToInt("renderVertColor", DisplayVertexColors);
     shader.SetBoolToInt("renderVertAlpha", DisplayVertexColorAlpha);
     shader.SetColor("diffuseColor", STColor8.White.Color);
 }
Example #3
0
 private void SetRenderSettings(ShaderProgram shader)
 {
     shader.SetInt("renderType", (int)Runtime.DebugRendering);
     shader.SetBoolToInt("hasDiffuse", false);
     shader.SetInt("selectedBoneIndex", Runtime.SelectedBoneIndex);
     shader.SetBoolToInt("renderVertColor", DisplayVertexColors);
     shader.SetBoolToInt("renderVertAlpha", DisplayVertexColorAlpha);
     shader.SetColor("diffuseColor", STColor8.White.Color);
     shader.SetBoolToInt("HasSkeleton", false);
     if (Scene.Models.Count > 0)
     {
         shader.SetBoolToInt("HasSkeleton", Scene.Models.Any(x => x.Skeleton.Bones.Count > 0));
     }
 }