![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
![]() |
#1 |
中国水兵
![]() Join Date: Apr 2005
Location: Germany
Posts: 275
Downloads: 10
Uploads: 0
|
![]()
Nice work! Is there also a red filter version available?
|
![]() |
![]() |
![]() |
#2 | |
Commander
![]() Join Date: Sep 2004
Posts: 462
Downloads: 62
Uploads: 0
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#3 |
XO
![]() Join Date: Mar 2007
Location: In your baffles...
Posts: 434
Downloads: 624
Uploads: 7
|
![]()
Yes!....
Mraah...you need to get busy and give us a real nice red display. PLEASE? |
![]() |
![]() |
![]() |
#4 |
Seasoned Skipper
![]() Join Date: Mar 2005
Location: UK
Posts: 683
Downloads: 104
Uploads: 1
|
![]() |
![]() |
![]() |
![]() |
#5 |
Engineer
![]() Join Date: Apr 2007
Location: Conning Tower - repairing the radar.
Posts: 200
Downloads: 8
Uploads: 0
|
![]() |
![]() |
![]() |
![]() |
#6 |
Seasoned Skipper
![]() Join Date: Mar 2005
Location: UK
Posts: 683
Downloads: 104
Uploads: 1
|
![]()
That picture is REAL but its my PPI in 1.2 using an edited version of your PPI grid (edited colour and radial blurs, softened text etc) so it shows up as orange on the red background...
I removed the RANGE and the RANGE NUMBERS too using anvarts SH4controller.act as a guide... I copied the original 1.3 shader into 1.2: Original 1.3 PPIRadarPS.fx 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 { // compute blurred color float4 blur=0; int N = 7; float R = 0.08; float Rcolor = 0.005; blur = tex2D(map, In.Tex0); for(int i=0;i<N;i++) { float angle = i*2*3.1419265/N; float2 coordblur = In.Tex0 + float2(cos(angle),sin(angle))*R; float2 coordcolor = In.Tex0 + float2(cos(angle),sin(angle))*Rcolor; blur += tex2D(map, coordblur); blur += tex2D(fadetex, coordcolor); } blur/=(2*N+1); blur = pow(blur,1.7); //blur = pow(max(0,(blur-0.2)*1.3+0.2),2); //blur.rb+=pow(blur.g,8); //float4 noise=tex2D(noise,In.Tex2*4)*Intensity; float4 color = tex2D(fadetex,In.Tex0); //color.rb+=pow(color.g,8); float4 ret=color;//+blur*0.25; ret.rb+=pow(ret.g,16); ret=pow(ret,1.5); ret = ret+blur*3; ret.rgb = ret.gbr * float3(1.15, 1, 1); return ret * (0.5 + Intensity*0.5); /* color=color+(noise.r-0.5f)*0.5f; float4 grid=tex2D(grid,In.Tex1); color=lerp(color,grid,grid.a); return color; */ } EDITED VERSION: 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 { // compute blurred color float4 blur=0; int N = 7; float R = 0.04; float Rcolor = 0.004; blur = tex2D(map, In.Tex0); for(int i=0;i<N;i++) { float angle = i*2*3.1419265/N; float2 coordblur = In.Tex0 + float2(cos(angle),sin(angle))*R; float2 coordcolor = In.Tex0 + float2(cos(angle),sin(angle))*Rcolor; blur += tex2D(map, coordblur); blur += tex2D(fadetex, coordcolor); } blur/=(2*N+1); blur = pow(blur,1.8); //blur = pow(max(0,(blur-0.2)*1.3+0.2),2); //blur.rb+=pow(blur.g,8); //float4 noise=tex2D(noise,In.Tex2*4)*Intensity; float4 color = tex2D(fadetex,In.Tex0)+tex2D(grid,In.Tex1); //color.rb+=pow(color.g,8); float4 ret=color;//+blur*0.6; ret.rb+=pow(ret.g,16); ret=pow(ret,1.4); ret = ret+blur*3; ret.rgb = ret.gbr * float3(1.2, 1, 1); return ret * (0.5 + Intensity*0.85); /* color=color+(noise.r-0.5f)*0.5f; float4 grid=tex2D(grid,In.Tex1); color=lerp(color,grid,grid.a); return color; */ } HIGHLIGHTED in yellow is the main change: Basically the same edit you guys used to get the PPI grid to show.. I think you could do the same in 1.3 and get it to show again but there is the new grid lines, which may interfere, and I don't know how to remove them... |
![]() |
![]() |
![]() |
#7 |
Silent Hunter
![]() Join Date: Apr 2005
Location: Riverside, California
Posts: 3,610
Downloads: 41
Uploads: 5
|
![]()
Question: the PPI's beam in 1.3 has a very jagged edge to it. Is there any way to clean it up so it has a more smooth edge to it?
|
![]() |
![]() |
![]() |
#8 | |
Engineer
![]() Join Date: Apr 2007
Location: Conning Tower - repairing the radar.
Posts: 200
Downloads: 8
Uploads: 0
|
![]() Quote:
Very good work!! You're well ahead of me on this subject ![]() When you have a moment, can you provide a link to your modded ACT file or explain your change to remove the text. I looked at the ACT earlier but I couldn't figure out where and what to change. I have a feeling the new grid lines where coded into the ACT file as well or somewhere. If we can drop their lines we'll be back in business. Again, Anvart might be able to do it ... he's has more of a grasp on the inner workings. Oh, I tried the "lerp" command but you had it right, the old "+tex2d(grid,In.Tex1)" additon seemed to work fine. Mraah |
|
![]() |
![]() |
![]() |
#9 | |
Admiral
![]() Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
|
![]() Quote:
__________________
Alex ® ![]() Moses said: "Don't create yourself an idol"... |
|
![]() |
![]() |
![]() |
#10 | ||
Engineer
![]() Join Date: Apr 2007
Location: Conning Tower - repairing the radar.
Posts: 200
Downloads: 8
Uploads: 0
|
![]() Quote:
Thanks for tips!! Yes, I noticed PPI texture no longer being used. I suspect it's being drawn by code in the SHController.act file ???? I say this because it's clean and basic, just lines and straight azimuth text. Perhaps you can have a look please? I'm thinking the text can be removed like you did in v1.3. Thanks Mraah |
||
![]() |
![]() |
![]() |
#11 | |||
Admiral
![]() Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
|
![]() Quote:
Because when you reduce brightness of PPI image (shader-code), you can see non-even painting of figures ...???? I can be not right ... And next, blur must to be for target-mark only (as reflected signal)...
__________________
Alex ® ![]() Moses said: "Don't create yourself an idol"... Last edited by Anvart; 08-01-07 at 12:38 PM. |
|||
![]() |
![]() |
![]() |
#12 | ||
Admiral
![]() Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
|
![]() Quote:
Examples (i have removed blur, it is not pleasant to me): 1) Red: 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 { float4 color = tex2D(fadetex,In.Tex0); float4 ret=color; ret.rb+=pow(ret.g,16); // ret=pow(ret,1.5); ret.rgb = ret.gbr * float3(1.8, 0.6, 0.6); return ret * (0.5 + Intensity*0.5); } 2) Green: 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 { float4 color = tex2D(fadetex,In.Tex0); float4 ret=color; ret.gb+=pow(ret.r,16); // ret=pow(ret,1.5); ret.rgb = ret.rgb * float3(0.1, 1.6, 0.1); return ret * (0.5 + Intensity*0.5); }
__________________
Alex ® ![]() Moses said: "Don't create yourself an idol"... Last edited by Anvart; 07-23-07 at 09:54 AM. |
||
![]() |
![]() |
![]() |
|
|