projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc3072b
)
Transform alpha channel as well in shader
author
kwolekr
<kwolekr@minetest.net>
Thu, 25 Apr 2013 16:29:27 +0000
(12:29 -0400)
committer
kwolekr
<kwolekr@minetest.net>
Thu, 25 Apr 2013 16:30:01 +0000
(12:30 -0400)
client/shaders/test_shader_3/opengl_fragment.glsl
patch
|
blob
|
history
diff --git
a/client/shaders/test_shader_3/opengl_fragment.glsl
b/client/shaders/test_shader_3/opengl_fragment.glsl
index 78abadcaf0535feb7634e9110944438dc0a5d67c..e42fef6e56e102fc9f888fb31a83d593a839313f 100644
(file)
--- a/
client/shaders/test_shader_3/opengl_fragment.glsl
+++ b/
client/shaders/test_shader_3/opengl_fragment.glsl
@@
-9,7
+9,8
@@
void main (void)
vec4 col = texture2D(myTexture, vec2(gl_TexCoord[0]));
\r
col *= gl_Color;
\r
col = col * col; // SRGB -> Linear
\r
- col *= 1.8;
\r
+ col *= 1.8;
+ col.a = 1.0 - exp(1.0 - col.a) / exp(1.0);
\r
col.r = 1.0 - exp(1.0 - col.r) / exp(1.0);
\r
col.g = 1.0 - exp(1.0 - col.g) / exp(1.0);
\r
col.b = 1.0 - exp(1.0 - col.b) / exp(1.0);
\r