Tag Info

New answers tagged

1

Since I am working with SpriteKit on iOS the shader support in SpriteKit is still missing a few things to implement an animated color gradient shader in SpriteKit. However for those who come up to the same situation I have found a more performant way to make animated gradients with sprite kit. Instead of working with shaders I have created a simple image ...


4

Here's how I would do this. First, make sure you have the object's UVs or world coords (which you can pass through from your vertex shader) available to you. If it's just a background, you could also just use fragment coords (gl_FragCoord). For instance, let's say we're using UV coords. A fragment shader with only: gl_FragColor = vec4(vec3(uv.x),1.0); will ...



Top 50 recent answers are included