Exemple #1
0
 protected ShaderBase(string shaderSource,
                      string entryPoint,
                      ShaderVersion shaderVersion,
                      ShaderFlags shaderFlags = ShaderFlags.None,
                      EffectFlags effectFlags = EffectFlags.None)
 {
     m_shaderByteCode = ShaderBytecode.Compile(shaderSource,
                                               entryPoint,
                                               shaderVersion.ToShaderVersionString(),
                                               shaderFlags,
                                               effectFlags);
 }
Exemple #2
0
        protected ShaderBase(string embeddedSourceResourceName,
                             Assembly resourceAssembly,
                             string entryPoint,
                             ShaderVersion shaderVersion,
                             ShaderFlags shaderFlags = ShaderFlags.None,
                             EffectFlags effectFlags = EffectFlags.None)
        {
            string shaderSource = GetResourceString(embeddedSourceResourceName, resourceAssembly);

            m_shaderByteCode = ShaderBytecode.Compile(shaderSource,
                                                      entryPoint,
                                                      shaderVersion.ToShaderVersionString(),
                                                      shaderFlags,
                                                      effectFlags);
        }