Bliss-Shader/shaders/world1/gbuffers_beaconbeam.fsh

30 lines
850 B
Plaintext
Raw Normal View History

2023-01-12 15:00:14 -05:00
#version 120
#include "/lib/settings.glsl"
2023-01-12 15:00:14 -05:00
varying vec4 lmtexcoord;
varying vec2 texcoord;
2023-01-12 15:00:14 -05:00
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:28 */
2023-01-12 15:00:14 -05:00
void main() {
2023-01-12 15:00:14 -05:00
vec4 Albedo = texture2D(texture, texcoord.xy) * color * 1.5;
gl_FragData[0] = vec4(toLinear(Albedo.rgb), 1.0);
gl_FragData[1] = vec4(0.0, 0.0, 0.0, 0.5);
2023-01-12 15:00:14 -05:00
}