GPU Animation Factory (UPDATE: Added texture rotate, auto-rotate clockwise/counter-clockwise)

Well thanks that will help. How ever, would it not be easier to split the shader up into different effects but keep it phong illumenated…?
For example:

  1. A wave / ripple shader
  2. A warp shader
  3. A breath
    4, swell
    5, etc

What do you think. Will this help to bring the uniform count down?

@ndebruyn said: Well thanks that will help. How ever, would it not be easier to split the shader up into different effects but keep it phong illumenated...? For example: 1. A wave / ripple shader 2. A warp shader 3. A breath 4, swell 5, etc

What do you think. Will this help to bring the uniform count down?

Well if you still want lighting…
You can remove:

  • normal maps uniforms
  • specular uniforms
  • optimize these uniforms and set them as constants in the shader code:
    uniform vec4 m_FogColor;
    uniform float m_FogDensity;
    uniform float m_FogDistance;
    varying float fog_z;

uniform float m_SpeedX;
uniform float m_SizeX;
uniform float m_DepthX;
uniform int m_DirX;
uniform bool m_MirrorX;
uniform float m_RotationX;
uniform float m_Offset1X;
uniform float m_Offset2X;

uniform float m_SpeedY;
uniform float m_SizeY;
uniform float m_DepthY;
uniform int m_DirY;
uniform bool m_MirrorY;
uniform float m_RotationY;
uniform float m_Offset1Y;
uniform float m_Offset2Y;

uniform float m_SpeedZ;
uniform float m_SizeZ;
uniform float m_DepthZ;
uniform int m_DirZ;
uniform bool m_MirrorZ;
uniform float m_RotationZ;
uniform float m_Offset1Z;
uniform float m_Offset2Z;

#ifdef USE_DEFORM
#ifdef USE_FWAVE
uniform float m_DeformF_Wave_SizeX;
uniform float m_DeformF_Wave_SizeY;
uniform float m_DeformF_Wave_DepthX;
uniform float m_DeformF_Wave_DepthY;
uniform float m_DeformF_Wave_SpeedX;
uniform float m_DeformF_Wave_SpeedY;
#endif
#ifdef USE_FWARP
uniform float m_DeformF_Warp_SizeX;
uniform float m_DeformF_Warp_SizeY;
uniform float m_DeformF_Warp_DepthX;
uniform float m_DeformF_Warp_DepthY;
uniform float m_DeformF_Warp_SpeedX;
uniform float m_DeformF_Warp_SpeedY;
#endif
#ifdef USE_FMIXER
uniform float m_DeformF_Mixer_SizeX;
uniform float m_DeformF_Mixer_SizeY;
uniform float m_DeformF_Mixer_DepthX;
uniform float m_DeformF_Mixer_DepthY;
uniform float m_DeformF_Mixer_SpeedX;
uniform float m_DeformF_Mixer_SpeedY;
#endif
#endif

I have played around a bit and am seriously in deep water here.
I actually don’t have a clue of what I am doing.
Can you please assist?

Just replace uniforms which mentioned with your own values (which work on your desktop machine).

LikeThis:
[java]
uniform float m_SpeedX;
x = y * m_SpeedX;
[/java]

With this:
[java]
// uniform float m_SpeedX;
x = y * myValue;
[/java]

For example, “m_SpeedX = 0.2” and it work ok on your machine and in your test.

That is a good idea, thanks, I will try that.
So let me just confirm. You want me to replace the defined uniforms with static values inside my vertex shader?
Is that correct.

yep… try this way to reduce uniforms/variables…