public static PipelineData CreatePipelineData(MeshInfo meshData) { PipelineData pipeline = new PipelineData(); pipeline.hasNormals = meshData.normals.length > 0 ? 1 : 0; pipeline.hasTangents = meshData.tangents.length > 0 ? 1 : 0; pipeline.hasColors = meshData.colors.length > 0 ? 1 : 0; pipeline.uvChannelCount = 0; pipeline.uvChannelCount += meshData.uv0.length > 0 ? 1 : 0; pipeline.uvChannelCount += meshData.uv1.length > 0 ? 1 : 0; return(pipeline); }
public static string GetIDForPipeline(PipelineData data) { string idstr = ""; idstr += data.hasNormals == 1 ? "1" : "0"; idstr += data.hasTangents == 1 ? "1" : "0"; idstr += data.hasColors == 1 ? "1" : "0"; idstr += data.uvChannelCount.ToString(); idstr += data.useAlpha == 1 ? "1" : "0"; idstr += data.descriptorBindings.length.ToString(); // need better id for these idstr += data.shaderStages.id.ToString(); return(idstr); }
public static extern int unity2vsg_AddBindGraphicsPipelineCommand(PipelineData pipeline, int addToStateGroup);