2023-01-12 15:00:14 -05:00
|
|
|
#version 120
|
|
|
|
|
2023-07-06 20:47:26 -04:00
|
|
|
#include "/lib/settings.glsl"
|
2023-01-12 15:00:14 -05:00
|
|
|
|
|
|
|
varying vec4 lmtexcoord;
|
|
|
|
varying vec4 color;
|
|
|
|
uniform sampler2D texture;
|
|
|
|
|
|
|
|
//faster and actually more precise than pow 2.2
|
|
|
|
vec3 toLinear(vec3 sRGB){
|
|
|
|
return sRGB * (sRGB * (sRGB * 0.305306011 + 0.682171111) + 0.012522878);
|
|
|
|
}
|
|
|
|
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
/* DRAWBUFFERS:2 */
|
|
|
|
|
2023-07-06 20:47:26 -04:00
|
|
|
void main() {
|
2023-01-12 15:00:14 -05:00
|
|
|
|
2023-07-06 20:47:26 -04:00
|
|
|
gl_FragData[0] = vec4(toLinear( texture2D(texture, lmtexcoord.xy).rgb * color.rgb), 0.1);
|
2023-01-12 15:00:14 -05:00
|
|
|
|
|
|
|
}
|