Set Wrap0 in Effect File

Started by
2 comments, last by EnochDagor 15 years, 10 months ago
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
Enoch DagorLead DeveloperDark Sky EntertainmentBeyond Protocol
Advertisement
Could you paste some code about how you're trying to set this renderstate from the effect file?
Sirob Yes.» - status: Work-O-Rama.
Yeah, I thought it was as simple as:

Wrap0=COORD0;
Enoch DagorLead DeveloperDark Sky EntertainmentBeyond Protocol
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.
Enoch DagorLead DeveloperDark Sky EntertainmentBeyond Protocol

This topic is closed to new replies.

Advertisement