Пример #1
0
 public M2ShaderEffect(M2PixelShaderType ps, M2VertexShaderType vs,
                       M2HullShaderType hs, M2DomainShaderType ds, uint colorOp, uint alphaOp)
 {
     PixelShader    = ps;
     VertexShader   = vs;
     HullShader     = hs;
     DomainShader   = ds;
     ColorOperation = colorOp;
     AlphaOperation = alphaOp;
 }
Пример #2
0
        public PixelShader GetPixelShader(M2PixelShaderType PixelShaderType)
        {
            var pixelShaderType = (int)PixelShaderType;

            if (pixelShaderType < mPixelShaders.Count)
            {
                var ps = mPixelShaders[pixelShaderType];
                if (ps != null)
                {
                    return(ps);
                }
            }

            return(mPixelShaders[(int)M2PixelShaderType.PS_Combiners_Opaque]);
        }