2023-01-12 15:00:14 -05:00
|
|
|
#version 120
|
|
|
|
|
2023-08-03 00:23:29 -04:00
|
|
|
#include "/lib/settings.glsl"
|
2023-01-12 15:00:14 -05:00
|
|
|
|
2023-08-03 00:23:29 -04:00
|
|
|
varying vec4 lmtexcoord;
|
2023-01-12 15:00:14 -05:00
|
|
|
varying vec2 texcoord;
|
2023-08-03 00:23:29 -04:00
|
|
|
varying vec4 color;
|
2023-01-12 15:00:14 -05:00
|
|
|
uniform sampler2D texture;
|
2023-07-01 15:53:13 -04:00
|
|
|
|
|
|
|
//faster and actually more precise than pow 2.2
|
2023-01-12 15:00:14 -05:00
|
|
|
vec3 toLinear(vec3 sRGB){
|
|
|
|
return sRGB * (sRGB * (sRGB * 0.305306011 + 0.682171111) + 0.012522878);
|
|
|
|
}
|
2023-07-01 15:53:13 -04:00
|
|
|
|
2023-01-12 15:00:14 -05:00
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
2023-07-01 15:53:13 -04:00
|
|
|
/* DRAWBUFFERS:28 */
|
2023-01-12 15:00:14 -05:00
|
|
|
|
|
|
|
void main() {
|
|
|
|
|
2023-08-03 00:23:29 -04:00
|
|
|
vec4 Albedo = texture2D(texture, texcoord.xy) * color;
|
|
|
|
|
|
|
|
gl_FragData[0] = vec4(toLinear(Albedo.rgb), Albedo.a);
|
|
|
|
gl_FragData[1] = vec4(0.0, 0.0, 0.0, 0.5);
|
2023-07-01 15:53:13 -04:00
|
|
|
|
2023-08-03 00:23:29 -04:00
|
|
|
}
|