mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
style
This commit is contained in:
+11
-14
@@ -4,29 +4,26 @@ in vec2 texCoords;
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
uniform sampler2D frag;
|
||||
uniform sampler2D bright;
|
||||
uniform bool hdr;
|
||||
uniform bool bloom;
|
||||
uniform float exposure;
|
||||
uniform float gamma;
|
||||
uniform sampler2D frag, bright;
|
||||
uniform bool hdr, bloom;
|
||||
uniform float exposure, gamma;
|
||||
|
||||
void main(){
|
||||
vec4 hdrColor=texture(frag,texCoords);
|
||||
vec4 brightColor=texture(bright,texCoords);
|
||||
vec2 texel=1.0/textureSize(bright,0);
|
||||
vec4 hdrColor = texture(frag, texCoords);
|
||||
vec4 brightColor = texture(bright, texCoords);
|
||||
vec2 texel = 1.0 / textureSize(bright, 0);
|
||||
|
||||
if(bloom)
|
||||
hdrColor+=brightColor;
|
||||
hdrColor += brightColor;
|
||||
|
||||
if(hdr){
|
||||
//Reinhardt
|
||||
//c.rgb=c.rgb/(c.rgb+vec3(1.));
|
||||
//c.rgb = c.rgb / (c.rgb + vec3(1.));
|
||||
|
||||
//Exp
|
||||
hdrColor.rgb=vec3(1.)-exp(-hdrColor.rgb*exposure);
|
||||
hdrColor.rgb = vec3(1.) - exp(-hdrColor.rgb * exposure);
|
||||
}
|
||||
|
||||
hdrColor.rgb=pow(hdrColor.rgb,vec3(1/gamma));
|
||||
FragColor=hdrColor;
|
||||
hdrColor.rgb = pow(hdrColor.rgb, vec3(1 / gamma));
|
||||
FragColor = hdrColor;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user