Alright I misinterpreted a previous post to mean I didn't need a vertex shader. The code you provided was very similar to what I had before I removed my vertex shader.
Here is what the cg program looked like before that. Almost like the one you gave me. I assume I have to pass in the texture in order for the program to use it. That is the only difference I am aware of.
However Ogre keeps informing me that my fragment shader will not compile. Everything looks right. Unfortunatly I don't know the subtle syntax differences between CG and C.
Could it be that texture coordinates may not be of float4 type?
I think they are supposed to be float2.
Code:
void MyFragmentShader1(float4 position : POSITION,
float4 worldPosition : TEXCOORD0,
out float4 color : COLOR,
uniform sampler2D texture)
{
color = tex2D(texture, WorldPosition.xy / 10.0f);
}
void MyVertexShader1(float4 position : POSITION,
out float4 oPosition : POSITION,
out float4 worldPosition : TEXCOORD0,
uniform float4x4 worldViewMatrix,
uniform float4x4 world)
{
worldPosition = mul(world, position);
oPosition = mul(worldViewMatrix, position);
}