lygia
/v1.1.6
/color
/exposure
)change the exposure of a color
Use:
exposure(<float|vec3|vec4> color, float amount)
#ifndef FNC_EXPOSURE
#define FNC_EXPOSURE
float exposure(float v, float a) { return v * pow(2., a); }
vec3 exposure(vec3 v, float a) { return v * pow(2., a); }
vec4 exposure(vec4 v, float a) { return vec4(v.rgb * pow(2., a), v.a); }
#endif
Use:
exposure(<float|float3|float4> color, float amount)
#ifndef FNC_EXPOSURE
#define FNC_EXPOSURE
float exposure(float value, float amount) {
return value * pow(2., amount);
}
float3 exposure(float3 color, float amount) {
return color * pow(2., amount);
}
float4 exposure(float4 color, float amount) {
return float4(exposure( color.rgb, amount ), color.a);
}
#endif
fn exposure(color : vec3<f32>, amount : f32) -> vec3<f32> {
return color * pow(2., amount);
}
LYGIA is dual-licensed under the Prosperity License and the Patron License for sponsors and contributors.
Sponsors and contributors are automatically added to the Patron License and they can ignore the any non-commercial rule of the Prosperity Licensed software (please take a look to the exception).
It's also possible to get a permanent comercial license hook to a single and specific version of LYGIA.
Sign up for the news letter bellow, joing the LYGIA's channel on Discord or follow the Github repository