Sha256: f54b9549c1355135dcf77ac4ffbce39fe8dcdf11f1a5cc43187aa28847084d98
Contents?: true
Size: 367 Bytes
Versions: 2
Compression:
Stored size: 367 Bytes
Contents
module Ray class Effect # An effect to invert the color of a pixel. This preserves the alpha component. class ColorInversion < Effect effect_name :color_inversion def code return <<code vec4 do_color_inversion(ray_color_inversion args, vec4 color) { return vec4(vec3(1, 1, 1) - color.rgb, color.a); } code end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ray-0.2.1 | lib/ray/effect/color_inversion.rb |
ray-0.2.0 | lib/ray/effect/color_inversion.rb |