Thanks Svengali.
I'm trying something now which is an attempt to brighten up the random paint colours on Griff's ships via script. Surprise, surprise it's not working. So I'm using the Griff Cobra III. Its shaders entry from shipdata.plist is....
Code: Select all
shaders = {
"griff_cobra_mk3_mainhull_diffuse_spec.png" = {
"fragment_shader" = "griff_cobra_mk3_player.fragment";
textures = (
"griff_cobra_mk3_mainhull_diffuse_spec.png",
"griff_cobra_mk3_mainhull_normal.png",
"griff_cobra_mk3_mainhull_effects.png",
"griff_player_decal.png"
);
uniforms = {
"Decal1_Rotation" = {
type = float;
value = "-0.73840";
};
"Decal1_Scale_and_Position" = {
type = vector;
value = "0.59 0.2 9.6";
};
PaintColor1 = {
scale = "0.17";
type = randomUnitVector;
};
PaintColor2 = {
scale = "0.17";
type = randomUnitVector;
};
alertlevel = alertCondition;
"damage_amount" = damage;
"engine_power" = speedFactor;
"hull_heat_level" = hullHeatLevel;
uColorMap = {
type = texture;
value = 0;
};
uDecalMap = {
type = texture;
value = 3;
};
uEffectsMap = {
type = texture;
value = 2;
};
uNormalMap = {
type = texture;
value = 1;
};
uTime = universalTime;
};
"vertex_shader" = "griff_normalmap_ships.vertex";
};
};
From a bit of shipdata editing I know that I can increase the value of
scale
for
PaintColor1
and
PaintColour2
to brighten up the random paint job. So to try and do it from the debug console for the player.ship I used...
Code: Select all
player.ship.setShaders({"griff_cobra_mk3_mainhull_diffuse_spec.png":{"fragment_shader": "griff_cobra_mk3_player.fragment",textures:["griff_cobra_mk3_mainhull_diffuse_spec.png","griff_cobra_mk3_mainhull_normal.png","griff_cobra_mk3_mainhull_effects.png","griff_player_decal.png"],uniforms:{"Decal1_Rotation":{type:"float",value:-0.73840},"Decal1_Scale_and_Position":{type:"vector",value:(0.59,0.2,9.6)},"PaintColor1":{scale: 1,type: "randomUnitVector"},"PaintColor2":{scale: 1,type: "randomUnitVector"}, "alertlevel": "alertCondition","damage_amount": "damage", "engine_power": "speedFactor", "hull_heat_level": "hullHeatLevel", "uColorMap":{type:"texture",value:0},"uDecalMap":{type:"texture",value:3},"uEffectsMap":{type:"texture",value:2},"uNormalMap":{type:"texture",value:1},"uTime":"universalTime"},"vertex_shader":"griff_normalmap_ships.vertex"}})
which returns true, but doesn't result in a visible change.....any ideas?