lygia
/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
Use:
exposure(<float|float3|float4> color, float amount)
#ifndef FNC_EXPOSURE
#define FNC_EXPOSURE
float exposure(float v, float a) { return v * pow(2., a); }
float3 exposure(float3 v, float a) { return v * pow(2., a); }
float4 exposure(float4 v, float a) { return float4(v.rgb * pow(2., a), v.a); }
#endif
fn exposure3(color : vec3f, amount : f32) -> vec3f { return color * pow(2., amount); }
fn exposure4(color : vec4f, amount : f32) -> vec4f { return vec4(exposure3(color.rgb, amount), color.a); }
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