Hello,
i am currently trying to get ContentPipeline run…
My sprite without effect is rendered correctly.
But loading a effect file , doesnt work;/
//------------------------------ TEXTURE PROPERTIES ----------------------------
// This is the texture that SpriteBatch will try to set before drawing
texture ScreenTexture;
// Our sampler for the texture, which is just going to be pretty simple
sampler TextureSampler = sampler_state
{
Texture = <ScreenTexture>;
};
//------------------------ PIXEL SHADER ----------------------------------------
// This pixel shader will simply look up the color of the texture at the
// requested point
float4 PixelShaderFunction(float2 TextureCoordinate : TEXCOORD0) : COLOR0
{
float4 color = tex2D(TextureSampler, TextureCoordinate);
float value = (color.r + color.g + color.b) / 3;
color.r = value;
color.g = value;
color.b = value;
return color;
}
//-------------------------- TECHNIQUES ----------------------------------------
// This technique is pretty simple - only one pass, and only a pixel shader
technique Plain
{
pass Pass1
{
PixelShader = compile ps_2_0 PixelShaderFunction();
}
}
when i am using this:
PixelShader = compile ps_4_0_level_9_1 PixelShaderFunction();
i get this message : Pixel shader ‘PixelShaderFunction’ must be SM 3.0 or lower!
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.ContentPipeline.targets" />
<PropertyGroup>
<ProjectGuid>{76F2AEE9-3A0A-48B0-9060-309633509DAF}</ProjectGuid>
<ProjectTypeGuids>{6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<Configuration Condition=" '$(Configuration)' == '' ">Windows</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ContentBuilder</RootNamespace>
<AssemblyName>IgnoreMe</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
<OutputPath>bin\$(Configuration)</OutputPath>
<XnaPlatform>Windows</XnaPlatform>
<XnaProfile>HiDef</XnaProfile>
<XnaCrossPlatformGroupID>613fe2e9-56c2-4459-908f-61239dffbfd0</XnaCrossPlatformGroupID>
<XnaOutputType>Library</XnaOutputType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Windows' ">
<MonoGamePlatform>Windows</MonoGamePlatform>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Windows8' ">
<MonoGamePlatform>Windows8</MonoGamePlatform>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Android' ">
<MonoGamePlatform>Android</MonoGamePlatform>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'iOS' ">
<MonoGamePlatform>iOS</MonoGamePlatform>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'OSX' ">
<MonoGamePlatform>OSX</MonoGamePlatform>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Linux' ">
<MonoGamePlatform>Linux</MonoGamePlatform>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'PSM' ">
<MonoGamePlatform>PSM</MonoGamePlatform>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MonoContentContent\MonoContentContent.contentproj">
<Name>MonoContentContent</Name>
<XnaReferenceType>Content</XnaReferenceType>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" />
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>