View Single Post
Old 05-20-07, 02:57 PM   #6
Mraah
Engineer
 
Join Date: Apr 2007
Location: Conning Tower - repairing the radar.
Posts: 200
Downloads: 8
Uploads: 0
Default

Quote:
Originally Posted by Hitman
This was already discussed in depth by Redwine and me in an old topic, do a search. Briefly: 1.0 had them, but 1.1 and 1.2 broke them, unknown reasons. The graphic is still there, in "Misc" folder (PPIcircles.dds) and the menu_1024 has not suffered any changes from 1.0 in the entries about the radar, or at least I could not track them down. Hope someone can solve it, because it helps a lot radar plotting liek I do:hmm:

Solved it ..... well, yes and no.

The file causing all the problems is called PPIRadarPS.fx located in the DATA\SHADERS\RADAR folder. This was the only file in this folder changed.

Open the file using notepad .... this is what it looks like, v1.2 additions are colored orange for your reference ...

.................................................. ..............

float Fade:register(c0);
float Intensity:register(c1);

sampler map: register(s0);
sampler grid: register(s1);
sampler noise: register(s2);
sampler fadetex: register(s3);

struct PS_IN
{
float2 Tex0 : TEXCOORD0;
float2 Tex1 : TEXCOORD1;
float2 Tex2 : TEXCOORD2;
float2 Tex3 : TEXCOORD3;
};

float4 main( PS_IN In ) : COLOR
{
//return float4(1,0,0,1);
float4 color=tex2D(map,float4(In.Tex0,4,4));
float4 noise=tex2D(noise,In.Tex2*4)*Intensity;
float4 f=tex2D(fadetex,In.Tex0);
return f;

color=color+(noise.r-0.5f)*0.5f;
float4 grid=tex2D(grid,In.Tex1);
color=lerp(color,grid,grid.a);

return color;
}


The original v1.0 filed looked like this below (same above without orange, except last part that reads 0.5f, originally reads 0.2f

..................................................
float Fade:register(c0);

sampler map: register(s0);
sampler grid: register(s1);
sampler noise: register(s2);
sampler fadetex: register(s3);
struct PS_IN
{
float2 Tex0 : TEXCOORD0;
float2 Tex1 : TEXCOORD1;
float2 Tex2 : TEXCOORD2;
float2 Tex3 : TEXCOORD3;
};

float4 main( PS_IN In ) : COLOR
{
//return float4(1,0,0,1);
float4 color=tex2D(map,float4(In.Tex0,4,4));
float4 noise=tex2D(noise,In.Tex2*4);

color=color+(noise.r-0.5f)*0.2f;
float4 grid=tex2D(grid,In.Tex1);
color=lerp(color,grid,grid.a);

return color;
}
.................................................. .....................

If you change it back to the original settings, BINGO .... range marks back. However, the sweep and radar targets are wicked fuzzy . I have no clue how to fix it. I've spent several hours since I got home this morning looking at it (well, hit and miss guessing), but I'm not a code writer. Hopefully a code specialist can fix it. The major problem is this line ...

float4 f=tex2D(fadetex,In.Tex0);
return f;

By the way, I discovered if you change these below you'll get big radar targets on initial sweep, then it gets small really quick.
1) remove the first line "float Intensity:register(c1);"
2) and replace this line "*4)*Intensity" with just a bracket ")" Here's what I used to get that if you can't follow my mumbling explaination ....

EDIT NOTE --- BELOW PASTE IS NOW CORRECT --- earlier version I goofed and pasted wrong one.
................................................
float Fade:register(c0);

sampler map: register(s0);
sampler grid: register(s1);
sampler noise: register(s2);
sampler fadetex: register(s3);

struct PS_IN
{
float2 Tex0 : TEXCOORD0;
float2 Tex1 : TEXCOORD1;
float2 Tex2 : TEXCOORD2;
float2 Tex3 : TEXCOORD3;
};

float4 main( PS_IN In ) : COLOR
{
//return float4(1,0,0,1);
float4 color=tex2D(map,float4(In.Tex0,4,4));
float4 noise=tex2D(noise,In.Tex2);
float4 f=tex2D(fadetex,In.Tex0);
return f;

color=color+(noise.r-0.5f)*0.5f;
float4 grid=tex2D(grid,In.Tex1);
color=lerp(color,grid,grid.a);

return color;
}

.................................................. .........




Also, one more note .... I suggest you use the mod that changes the NOISE.dds file (remember the cleaner picture with post processer filters on?) It just makes a cleaner range mark display.

The only other way to fix it is to add range marks manually, which I've been working on, and colorizing it a bit to a brownish red which is roughly the color of the tube when the sweep isn't burning the green into it.

Hope this helps!!!!

Last edited by Mraah; 05-20-07 at 04:34 PM.
Mraah is offline   Reply With Quote