Пример #1
0
 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();
 }
Пример #2
0
 public CHullShader(ICDevice device, CShaderReflection reflection)
     : base(device, reflection)
 {
     domain = reflection.GetTesselationDomain();
     partitioning = reflection.GetTesselationPartitioning();
     outputTopology = reflection.GetTesselationOutputTopology();
     outputControlPoints = reflection.GetOutputControlPoints();
     maxTesselationFactor = reflection.GetMaxTesselationFactor();
 }
Пример #3
0
 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");
     }
 }
Пример #4
0
 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");
     }
 }