Shader Uniforms - vec4's - FIXED

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Shader Uniforms - vec4's - FIXED

Post by Griff »

Edit: sorry, i just checked Ahrumans progress thread and remembered vec4's were never supported. I've re-written the shader i was having a problem with to use a vec3 and a float
Does Oolite overwrite the 4th component of a shader uniform vec4 with a value of 1.0?
eg, will this vec4 uniform

Code: Select all

Decal1SettingsUniform = { type = vector; value = "0.83 0.67 9.0 0.7854"; };
be sent to the shader as

Code: Select all

Decal1SettingsUniform = { type = vector; value = "0.83 0.67 9.0 1.0"; };
if so, is there an easy way to stop this happening? I'd like to use all 4 components if possible, although it wouldn't be too much trouble to split the 4th component into a seperate uniform float for the shader to use if it's a massive re-programming job
Post Reply