Class: Ray::Effect::ColorInversion
- Inherits:
-
Ray::Effect
- Object
- Ray::Effect
- Ray::Effect::ColorInversion
- Defined in:
- lib/ray/effect/color_inversion.rb
Overview
An effect to invert the color of a pixel. This preserves the alpha component.
Instance Method Summary collapse
Methods inherited from Ray::Effect
#apply_defaults, attribute, attributes, #defaults, effect_name, #header, #name, #struct
Instance Method Details
#code ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/ray/effect/color_inversion.rb', line 7 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 |