Carrier Command 2: Screen Shader Modding Guide

This guide is meant to save you the trial and error frustration of learning shader semantics in order to customize screens however you may well damn please. Tl;Dr no cracking open my mod files to check now, theres an easy check reference guide for how i achieved x effect.

 

Introduction

What is a screen shader?

Sounds rather basic of a question but this did take some hunting to find.
A screen shader is a shader file found within rom_0/shaders witht he file names screen_crt.glslscreen_crt_hud.glsl, and holomap_post.glsl.
The first one is responsible for the CRT effects on screens all over your bridge control, such as static noise, scanlines, and even that dreaded vertex edge warp that makes it look like it was bended like a shoddy piece of tin! The second one is responsible for the HUD crt effects in vehicle cameras and your ship’s periscope cam, but you never really notice these. The final one deals with the holotable, and how it looks. While the holotable has it’s own light in its object file, it is purely for decorative purposes of creating a cheap area light to make it look like it illuminates the area around it more than a screen.This seems to turn off with the holomap having dark colors anyway, no need to change it.

The next three sections deal with induvidual editable fields in order of first to last. Refer to them accordingly.

Screen_CRT.glsl, Regular screens

This is by far the most extensive to modify, so let us simply get into it.

Screen Resolution x/y

controls relative effect resolution based on your monitor or games set resolution, for some reason. also controls the general plane of effects added but i havent touched this.

pi

dont touch this, used for the RNG effects

warp vertex coords at edge of screen

the first big block of sheer stuff, however you can only edit two fields. the first valuee(default 1.0) is the actual intensity value. setting this to 0 will remove the effect. the other value(default 0.5) is the centering of the warp effect. so changing to 1 will kick the effect to the right while 0 will kick the warp effect to the left. why you would want this i will never know, but disabling rounded corners by this will cause screens to overlap over the non square screen model edges ingame.

scanlines

do not be intimidated by the sheer numbers here, lets break it down
distance factor is distance between lines, with 4 the default. the next line after this is how much pixels are affected by this scanline warp wise. scanline brightness is how bright the scanline is in a ratio of the last two numbers. in these, the effect is always left and the original screen output is the right. so a value of 0.2, 0.8 would be 80% normal screen with 20% scanline visibility. numbers greater than 1 will cause solid colors and i do not reccomend unless you wanna see a giant monolith in the distance(shader error). animation time is how fast the scanlines scroll, it is how you expect but the timescale itself is unknown(linear? multiplier? seconds???). the value of 1.0 in the triple set of 4.0, 0.0 and 1.0 is the scanline width, or maybe i have them backwards idk

chromatic abberation

this is a simple thing, it offsets red and blue colors on screen to the left and right accordingly. first value is the abberation visibility intergar, while the second value is the abberation intensity. good if you wanna make your screens compatible with those cheap red n blue glasses i guess.

warped vertex coord 2

this is the warped effect for abberation for some reason, unless i messed with abberation i never messed with it but it could be good on holograms or something

the noise effect

the next two sections deal with noise
noise resolution is the size of noise pixels, higher numbers mean smaller pixxels but you need a multiple of 2. i have no idea what animation rand does but i do know the mix(default 0.1 0.9) is 90% screen 10% noise. be warned that drastically increasing noise factor is going to make your screen darker for some reason. lastly, color noise amount value is just how noisy it is, just think what you want and add a few zeroes, but the noise does seem to scale with distance from screen strangely.

color

this is by far the easiest section, values in rgb format
backlight is just that, the background light emitted behind things. for example, my dakrmode screen mod just sets every backlight color value to 0. the next three values are actually color filters, and can block light by setting a value to 0. this is how i made my screens a single color, a mix of the two, or just really ♥♥♥♥♥♥♥ BLUE. do not set values bigger than 1, it just gives you another ominous white monolith. just be aware that blocking a color will hide certain elements of that color, like blue is the landmass color and so is green used in it too, while the out of ammo icon for vehicles loadout screen is red. this is why i say my popular mod lcd screens is a downgrade, as it litterally makes the holomap nigh useless due to you being unable to see the ship in any facet along with islands.

viginette factor

this does…nothing. i changed it a bunch but it doesnt do anything it seems

color sample

yet again never touched this, but seems to be general output brightness. so i guess you can make screens dim?

Screen_CRT_HUD.glsl, The camera

this one is smaller but does contain most effects.
since it follows most of the same as screen_crt, i will only go over the exceptions and what they do.

note, screen resolution does NOT change camera resolution.

scanlines

here they arefar more boiled down, and later on scanlines are repeated but i have no idea why they did this. same as usual, just looking skinny

abbeeration

this affects the HUD itself, not the camera output sadly

warped effects

no matter how much i mess with it, the vignette will remain, so any hints on how to remove this are appreciated
otherwise this does basically nothing

backlight

your backlight will backlight the entire overlay, and actually really cool for a nice looking cam, but the main use is for recoloring the hud if you strike a balance in brightness between flashbanging yourself on loading and a nice looking hud youre happy with.

color filter

only filters the hud sadly, but in conjunction with the backlight you can make a pretty sick night vision camera

vignette factor

does nothing as far as im aware

Holomap_Post.glsl, The holotable

this is by far the hardest bunch to get working, so let us go over it.

abberation

abberation can be used to sell a holographic appearance of something, but otherwise you can leave it be or turn it off.

noise

there is indeed noise, but it only overlays ontop of holomap objetcs, such as the holomap grid and island features and whatever else it renders. just not the background decorational blue glow or whatever

custom colors

in order to get custom colors, paste this into the file right before the last line on colors(color_sample):
vec3 backlight_color = vec3(0.0, 0.0, 0.0);

color_sample_r = mix(backlight_color.r, 1.0, color_sample_r);
color_sample_g = mix(backlight_color.g, 1.0, color_sample_g);
color_sample_b = mix(backlight_color.b, 1.0, color_sample_b);

this is simple but let us go over it
backlight can indeed change the screen background color, but when over 1 or so values, it can light up a big cube with that color to REALLY sell the holograph look
color filters will work, but values hiding blue will make islands invisible on the map, not the names tho. you may can do some real trickery to make it snap colors to those co-ords of those colors instead but i havent messed with this.
default copy paste from screen_crt will have a “* screen_crt_effect_factor”, this causes a big fat white monolith to appear in the distance and the holomap to cease working. just remove it up to them ;

there is a way to make scanlines but they do not work properly, so a code function for proper scanlines instead of the broken effect from regular screens would be greatly appreciated.

More Guides:

Leave a Comment

ArabicEnglishFrenchGermanItalianJapaneseKoreanPortugueseSpanish