diff options
author | Travis CI <zmoelnig@travis-ci.umlaeute.mur.at> | 2015-03-19 19:32:08 +0000 |
---|---|---|
committer | Travis CI <zmoelnig@travis-ci.umlaeute.mur.at> | 2015-03-19 19:32:08 +0000 |
commit | 095b7e513f736567848173f2572d8b329ad75af9 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /Gem/examples/10.glsl/GLSL_mix.frag | |
parent | 15b30fe20b401d079c2b3c6a8e77eee827813de3 (diff) |
Gem 206d71791bc3642e8c5391a4c59c30ba7411fab8 osx/x86_64
built 'coverity_scan:206d71791bc3642e8c5391a4c59c30ba7411fab8' for osx/x86_64
Diffstat (limited to 'Gem/examples/10.glsl/GLSL_mix.frag')
-rw-r--r-- | Gem/examples/10.glsl/GLSL_mix.frag | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/Gem/examples/10.glsl/GLSL_mix.frag b/Gem/examples/10.glsl/GLSL_mix.frag deleted file mode 100644 index ce47bf8..0000000 --- a/Gem/examples/10.glsl/GLSL_mix.frag +++ /dev/null @@ -1,35 +0,0 @@ -//jack/RYBN 2010 -#extension GL_EXT_gpu_shader4 : enable -#extension GL_ARB_texture_rectangle : enable -uniform sampler2DRect Ttex1; -uniform sampler2DRect Ttex2; -uniform sampler2DRect tex0; -uniform float style; -uniform float mix_factor; -varying vec2 texcoord0; -ivec2 size1 = textureSize2DRect(Ttex1, 0); -ivec2 size2 = textureSize2DRect(Ttex2, 0); -ivec2 size0 = textureSize2DRect(tex0, 0); - -void main (void) -{ - float sizeF1X = float(size1.x)/float(size0.x); - float sizeF1Y = float(size1.y)/float(size0.y); - float sizeF2X = float(size2.x)/float(size0.x); - float sizeF2Y = float(size2.y)/float(size0.y); - vec4 color1 = texture2DRect(Ttex1, vec2(texcoord0.s*sizeF1X,texcoord0.t*sizeF1Y)); - vec4 color2 = texture2DRect(Ttex2, vec2(texcoord0.s*sizeF2X,texcoord0.t*sizeF2Y)); - if (style == 0.) { - gl_FragColor = (color1 + color2); - } else if (style == 1.) { - gl_FragColor = (color1 - color2); - } else if (style == 2.) { - gl_FragColor = abs(color1 - color2); - } else if (style == 3.) { - gl_FragColor = (color1 * color2); - } else if (style == 4.) { - gl_FragColor = mix(color1,color2,mix_factor); - } - -} - |