Jump to content
Eagle114th

Experimenting with TV shaders and interesting results

Recommended Posts

Hello everyone!

This week have been very interesting with tons of researching, experimenting and testing the TV filters and  FX (Shader) files.

What I have learned so far with this theory from observation and countless testing;

SF2 Engine does not allow us to direclty mix the shaders with 3D world for TV screen via radar texture methods.  (UseRadarTexture=TRUE), BUT it does allow us to use sampling to add the 'tilted / hue colors' to the TV.

After testing various .FX, including FLTDTVFILTER.FX, turns out that TWCOLOR1.FX and TWCOLOR2.FX works because it uses sampling methods.

However, after testing TWCOLOR2.FX, what I learend is that only one of colro can be used with taht FX due to Alpha being 1.0 by default, which mean, the last texture laoded will overwrite the first one.  Fortuantely, it got fixed, by setting Alpha to 0.5, which allows me to combine any two colors that would give me various colors.

For example

I have various color texture (mostly JPG, except for Alpha one that have invisible color)

image.png.32c89b77ac879bcd91b878f91f824214.png

When testing with two colors with updated TWCOLOR2.FX, used this folowing codes in .INI FILE:

 

Quote

[TVDisplayData]
UseRadarTexture=TRUE
DisplayLimitLeft=0
DisplayLimitRight=1024
DisplayLimitTop=0
DisplayLimitBottom=1024
ApplyFilter=TRUE
FilterMaterial=DTVFilterMaterial
OverlayTexture=

[DTVFilterMaterial]
EffectShaderName=TWCOLOR2.FX
DepthBufferCheck=FALSE
DepthBufferWrite=FALSE
RenderedInOrder=FALSE
AlphaTestEnabled=FALSE
CullMode=NO_CULL
LightEnabled=FALSE
UseLightLevel=FALSE
SpecularEnabled=FALSE
EmissiveEnabled=FALSE
FogEnabled=FALSE
AmbientColor=1.00, 0.00, 0.00, 1.00
DiffuseColor=1.00, 0.00, 0.00, 1.00
ZBufferOffset=0.00
PriorityLevel=3
BlendOp=MODULATE
NumTextureStages=2

TextureStage[01].TextureName=cockpit\TV\BLACK.JPG
TextureStage[01].MipMap=FALSE
TextureStage[01].FilterEnabled=FALSE
TextureStage[01].StageColorOp=TEXTURE_ALPHA
TextureStage[01].StageAlphaOp=DIFFUSE_ALPHA

TextureStage[02].TextureName=cockpit\TV\WHITE.JPG
TextureStage[02].MipMap=FALSE
TextureStage[02].FilterEnabled=FALSE
TextureStage[02].StageColorOp=TEXTURE_ALPHA
TextureStage[02].StageAlphaOp=DIFFUSE_ALPHA


The result in-game (A-4E '65)

img00003.thumb.JPG.9f1babf5ee19d2e898291dbf5b925a9f.JPG


I was even more curious, what happens if I add third color?
 

Quote

[TVDisplayData]
UseRadarTexture=TRUE
DisplayLimitLeft=0
DisplayLimitRight=1024
DisplayLimitTop=0
DisplayLimitBottom=1024
ApplyFilter=TRUE
FilterMaterial=DTVFilterMaterial
OverlayTexture=

[DTVFilterMaterial]
EffectShaderName=TWCOLOR3.FX
DepthBufferCheck=FALSE
DepthBufferWrite=FALSE
RenderedInOrder=FALSE
AlphaTestEnabled=FALSE
CullMode=NO_CULL
LightEnabled=FALSE
UseLightLevel=FALSE
SpecularEnabled=FALSE
EmissiveEnabled=FALSE
FogEnabled=FALSE
AmbientColor=1.00, 0.00, 0.00, 1.00
DiffuseColor=1.00, 0.00, 0.00, 1.00
ZBufferOffset=0.00
PriorityLevel=3
BlendOp=MODULATE
NumTextureStages=3

TextureStage[01].TextureName=cockpit\TV\BLACK.JPG
TextureStage[01].MipMap=FALSE
TextureStage[01].FilterEnabled=FALSE
TextureStage[01].StageColorOp=TEXTURE_ALPHA
TextureStage[01].StageAlphaOp=DIFFUSE_ALPHA

TextureStage[02].TextureName=cockpit\TV\WHITE.JPG
TextureStage[02].MipMap=FALSE
TextureStage[02].FilterEnabled=FALSE
TextureStage[02].StageColorOp=TEXTURE_ALPHA
TextureStage[02].StageAlphaOp=DIFFUSE_ALPHA

TextureStage[03].TextureName=cockpit\TV\RED.JPG
TextureStage[03].MipMap=FALSE
TextureStage[03].FilterEnabled=FALSE
TextureStage[03].StageColorOp=TEXTURE
TextureStage[03].StageAlphaOp=DIFFUSE

The resault:

img00004.thumb.JPG.265d40a640cdaea2bcb6c2f0ba72e787.JPG

I have many files to share here, so anyone can have resources, information, and files to experiment with, not only TV, also any thing else in SF2.

IN the files "TW SHADER FILES.zip" it is extracted files using SF2 Extractor and the file names inside each file's header are corrected to avoid the confusion.

TW SHADER FILES.zip

And in the file "TW SHADER FILES - NEW", there are updated TWOCOLOR2.FX, along with new TWCOLOR3.FX and TWCOLOR4.FX, you can experiment with various texture files.

TW SHADER FILES - NEW.zip

In the file "TW FX FILES INFORMATION.txt", it contains summary of each shaderas.  It seems too bvious for us who already are familiar with it, but it does not hurt to at least have it.  I used SearchGPT to assist with me. WIthout it, it would have taken me too long time.

TW FX FILES INFORMATION.txt

 

Finally, the file "FX FILES CONTENTS.txt" have long list of Shader's codes, consdier it as 'hand book" for quick references to any shader codes.

FX FILES CONTENTS.txt

 

RIght now I am continuing to experiment with many thories I have about sampling techniques to turn TV into grayscale for early CRT TV in early cold war aircraft.


Eagle114th

TW FX FILES INFORMATION.txt

Edited by Eagle114th
  • Like 5

Share this post


Link to post
Share on other sites

nice find :good:

how about a black and white TV screen for EO guided weapons   , would that be possible ???

Share this post


Link to post
Share on other sites
34 minutes ago, ravenclaw_007 said:

nice find :good:

how about a black and white TV screen for EO guided weapons   , would that be possible ???

I would love to have that too!

However, after days of experimenting and trying countless testings; It only ended ujp giving me black screen on TV screen.

It turns out that, the most pracical thing to do is to use multi layers of textures:

Main texture (gray) to 'simulate' gray scale sorta

next layer CRT lines and other graphic on top of it, with transparent background (alpha)

then final, the darkness adjustment, darker around corner, less dark (more transprent) toward center

That is what I am doing now.

However, ti does not mean I have given up finding the way to have 'true grayscale" I hope someday it can be figured out.


Eagle14th

Edited by Eagle114th
  • Thanks 1

Share this post


Link to post
Share on other sites

For now, by color sampling methods, I am doing my best to give it a 'feeling' of old 1960s CRT and grayscale sorta of.

Based on this:

image.thumb.png.5f6a78f2884d83550c5bb0f2561444d0.png

Here is top layer (1960s CRT effects)

6780c09702af4_Screenshot2025-01-10153727.png.6680eb56578d3c040790716256bb90ce.png


PLEASE NOTE, I am not trying to make TV actauly being grayscale because it is not possible right now.  Rather, by arts and styles, I am making it feel like you ahve ojld CRT TV from 1960s, by adding the gray hue / tilt on top of TV with old CRT style on top of it.

This is the result:

img00015.thumb.JPG.4b868122d51529cb8770140305d357d5.JPG

 

However I am still exploring to see what more I can do to further improve the sense of 'grayscale'. 


Eagle114th

Edited by Eagle114th
  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Hello everyone

After testing with various texture as color filter for TV, this is the best I can do that would make it seem like you are using old CRT TV:

 

 

UPDATE: WIth excellent ideas from Menrva, added the noises' to CRT effect layer, here is latest screenshot:

img00005.thumb.JPG.f24d553decae58fbd0e0debaccf65c31.JPG

Created four textues for testing color filters

image.png.30aac75c3c97d1722309a4ae4601b921.png

 

This one is the best, not too transparent (clear) nor too dark

6781076917e97_GRAYHUE-2.JPG.31f576a4aabc592ada44d76384980611.JPG

Along with top layer (TGA) containing CRT style texture:

image.png?ex=67825ab6&is=67810936&hm=87823d8e6c9dd8db2fd7d073a11f5895e93a53e27a9e9dc75e028262268326b7&=


Eagle114th

Edited by Eagle114th
  • Like 5
  • Thanks 3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By VonS
      Hi All,
      Have now posted my ReShade preset file for FE2 (and SF2) in the following post located under the FM Tweaks Package thread:
      https://combatace.com/forums/topic/87403-tweaked-flight-models-and-realism-pack-for-fe2/?page=8&tab=comments#comment-783977
      See below for examples of before/after pics. with stock shaders and improved shaders loaded in FE2 (the preset was tested in ver. 4.9.1 of ReShade). Was never able to get the ENB Series shaders files working in FE2, or even SweetFX for that matter - but this (later) version of ReShade works great. More details/info. included in the "Read Me" file that comes with the zipped download package.
      I think that the sun/color effects are now a little bit closer to the (realistic) tweaks that Geezer mentioned, a few yrs. back, in one of the threads here - regarding improved lighting and various color effects in FE2. Loading a preset file via ReShade is of course simpler than manually tweaking the environsys.ini file in FE2. The other good thing about these improved shaders is slightly smoother anti-aliasing effects too than in stock configuration. Also, no negative effect on FPS with these shaders loaded and that I was able to observe.
      Happy flying all,
      Von S 
       
      Example One - Stock Shaders in FE2

      Example One - Improved Shaders Loaded in FE2

      Example Two - Stock Shaders in FE2

      Example Two - Improved Shaders Loaded in FE2

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..