mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 16:52:38 +08:00
intial changes for commit #495
This commit is contained in:
@ -1,10 +1,13 @@
|
||||
// LPV block brightness scale
|
||||
const float LpvBlockBrightness = 1.0;
|
||||
// LPV block brightness scale. just 1.0/15.0
|
||||
const float LpvBlockBrightness = 0.066666;
|
||||
|
||||
|
||||
float lpvCurve(float values) {
|
||||
// return values;
|
||||
return pow(1.0 - sqrt(1.0-values), 2.0);
|
||||
#ifdef VANILLA_LIGHTMAP_MASK
|
||||
return sqrt(values);
|
||||
#else
|
||||
return values*values;
|
||||
#endif
|
||||
}
|
||||
|
||||
vec4 SampleLpvLinear(const in vec3 lpvPos) {
|
||||
@ -17,6 +20,8 @@ vec4 SampleLpvLinear(const in vec3 lpvPos) {
|
||||
vec3 hsv = RgbToHsv(lpvSample.rgb);
|
||||
hsv.z = lpvCurve(hsv.b) * LpvBlockSkyRange.x;
|
||||
lpvSample.rgb = HsvToRgb(hsv);
|
||||
|
||||
lpvSample.rgb = clamp(lpvSample.rgb/15.0,0.0,1.0);
|
||||
|
||||
return lpvSample;
|
||||
}
|
||||
|
Reference in New Issue
Block a user