Set Wrap0 in Effect File
Ok, so I have a line of code that makes it so that rendering textured spheres is not ugly.
moDevice.RenderState.Wrap0 = WrapCoordinates.Zero
Now, I wrote an FX file to render a sphere with some cool effects and stuff... but it seems that setting this render state does not affect the FX file. So... how do I do it now?
To illustrate the issue:
Image with Artifact
Old Way, without artifact
-E
Could you paste some code about how you're trying to set this renderstate from the effect file?
Ok I have tried several renditions...
Outside of the .fx file:
moDevice.RenderState.Wrap0 = WrapCoordinates.Zero
// set up our effect here
// render the sphere
// end the effect
moDevice.RenderState.Wrap0 = 0
Inside the .fx file:
technique NormalMapTech
{
pass P0
{
Wrap0 = COORD0;
//Do render calls
}
}
Always the same result. However, without the .fx file, everything works fine.
Outside of the .fx file:
moDevice.RenderState.Wrap0 = WrapCoordinates.Zero
// set up our effect here
// render the sphere
// end the effect
moDevice.RenderState.Wrap0 = 0
Inside the .fx file:
technique NormalMapTech
{
pass P0
{
Wrap0 = COORD0;
//Do render calls
}
}
Always the same result. However, without the .fx file, everything works fine.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement