Exemplo n.º 1
0
        private static void ComparePass(EffectPass reflectionPass, Fx10.EffectPass pass)
        {
            EffectPassDescription desc = reflectionPass.Description;

            Assert.AreEqual(desc.Name, pass.Name);
            var annotations = reflectionPass.GetAnnotations();

            for (int i = 0; i < desc.AnnotationCount; i++)
            {
                CompareVariable(annotations[i], pass.Annotations[i]);
            }

            /*var pixelShader = pass.Shaders.FirstOrDefault(
             *      s => s.ShaderType == Fx10.EffectShaderType.PixelShader);
             * if(pixelShader != null)
             * {
             *      EffectPassShaderDescription shaderDesc = reflectionPass.PixelShaderDescription;
             *      CompareShader(shaderDesc, pixelShader);
             * }
             * var vertexShader = pass.Shaders.FirstOrDefault(
             *      s => s.ShaderType == Fx10.EffectShaderType.VertexShader);
             * if (vertexShader != null)
             * {
             *      EffectPassShaderDescription shaderDesc = reflectionPass.VertexShaderDescription;
             *      CompareShader(shaderDesc, vertexShader);
             * }
             * var geometryShader = pass.Shaders.FirstOrDefault(
             *      s => s.ShaderType == Fx10.EffectShaderType.GeometryShader);
             * if (geometryShader != null)
             * {
             *      EffectPassShaderDescription shaderDesc = reflectionPass.GeometryShaderDescription;
             *      CompareShader(shaderDesc, geometryShader);
             * }*/
        }