public CDomainShader(ICDevice device, CShaderReflection reflection) : base(device, reflection) { glShadersToGeometry = new TightConcurrentDictionary<TesselationLayout, TesselationEvaluationShader>(TesselationLayout.Equal); glShadersToPixel = new TightConcurrentDictionary<TesselationLayout, TesselationEvaluationShader>(TesselationLayout.Equal); domain = Reflection.GetTesselationDomain(); }
public CHullShader(ICDevice device, CShaderReflection reflection) : base(device, reflection) { domain = reflection.GetTesselationDomain(); partitioning = reflection.GetTesselationPartitioning(); outputTopology = reflection.GetTesselationOutputTopology(); outputControlPoints = reflection.GetOutputControlPoints(); maxTesselationFactor = reflection.GetMaxTesselationFactor(); }
public static string DomainToString(TesselationDomain domain) { switch (domain) { case TesselationDomain.Isoline: return "isoline"; case TesselationDomain.Triangle: return "tri"; case TesselationDomain.Quad: return "quad"; default: throw new ArgumentOutOfRangeException("domain"); } }
static int GetTessFactorLength(TesselationDomain domain) { switch (domain) { case TesselationDomain.Isoline: return 2; case TesselationDomain.Triangle: return 3; case TesselationDomain.Quad: return 4; default: throw new ArgumentOutOfRangeException("domain"); } }