Original Post
I have to draw x, y, z level lines on my relief surface. 2 soluttions: 1. Using of additional geometry (lines). Major disadvantage - i need time to calculate this lines. 2. Using pixel shader. But on this way i have troubles: first
and second
Any ideas, how to get "good" level lines in shader? [Edited by - mr_hell on April 2, 2009 6:31:04 AM]
float4 TestP1(PS_INPUT Input): COLOR0
{
float4 Color;
int z = ceil(Input.Position.y);
int y = ceil(Input.Position.z);
int x = ceil(Input.Position.x);
Color = Input.Color;
if(abs(fmod(z, 100))<1.0)
{
Color.b = 1.0f;
Color.r = Color.g = 0.0f;
}
if(abs(fmod(x, 100))<1.0)
{
Color.b = 1.0f;
Color.r = Color.g = 0.0f;
}
if(abs(fmod(y, 100))<1.0)
{
Color.r = 1.0f;
Color.b = Color.g = 0.0f;
}
return Color;
}
and second
Any ideas, how to get "good" level lines in shader? [Edited by - mr_hell on April 2, 2009 6:31:04 AM]

