Skip to main content
Tweeted twitter.com/#!/StackGameDev/status/514344321991323648
deleted 53 characters in body
Source Link
Kromster
  • 10.7k
  • 4
  • 55
  • 67

I would like to do the following: Havehave a background of a given size and fill itfilled with a given color. Every time I change this color thewant to change should be done animatedit with an animation effect, starting from the center and spread out until it extends the whole background. Also theThe new color should fade / blend smooth into the existing color from the background. Some kind of radial gradient that changes the color and then spreads out over the whole background.

I am working with SpriteKit on iOS and I am really sure that the best way to implement this is to do this with fragment shaders which are new to iOS 8 SpriteKit SDK. I have done some work with shaders and understand how they work but I am asking for help more on the mathematics behind this.

I would like to do the following: Have a background of a given size and fill it with given color. Every time I change this color the change should be done animated, starting from the center and spread out until it extends the whole background. Also the color should fade / blend smooth into the existing color from the background. Some kind of radial gradient that changes the color and then spreads out over the whole background.

I am working with SpriteKit on iOS and I am really sure that the best way to implement this is to do this with fragment shaders which are new to iOS 8 SpriteKit SDK. I have done some work with shaders and understand how they work but I am asking for help more on the mathematics behind this.

I have a background of a given size and filled with a given color. I want to change it with an animation effect, starting from the center and spread out until it extends the whole background. The new color should fade / blend smooth into the existing color from the background. Some kind of radial gradient that changes the color and then spreads out over the whole background.

I am working with SpriteKit on iOS and I am really sure that the best way to implement this is to do this with fragment shaders which are new to iOS 8 SpriteKit SDK. I have done some work with shaders and understand how they work but I am asking for help more on the mathematics behind this.

Source Link
Simon Kemper
  • 203
  • 1
  • 2
  • 7

How to implement color changing fragment shader?

I would like to do the following: Have a background of a given size and fill it with given color. Every time I change this color the change should be done animated, starting from the center and spread out until it extends the whole background. Also the color should fade / blend smooth into the existing color from the background. Some kind of radial gradient that changes the color and then spreads out over the whole background.

I am working with SpriteKit on iOS and I am really sure that the best way to implement this is to do this with fragment shaders which are new to iOS 8 SpriteKit SDK. I have done some work with shaders and understand how they work but I am asking for help more on the mathematics behind this.