For the Liverpool John Moores University Virtual Reality Low Carbon Film (that is a longgggg name) project, we set the scene in space for act 1.

The planets looks fine, but our Sun needed work. Our beautiful star in the sky is a ball of gas at awesomely high temperatures which add some movement. I want to say lava, but it is not and we don’t want the Sun Police to come for us, but you get the point… the surface needs to look like it moves around.

To do this, we used 2 textures; 1 noise, and 1 sun texture.

Pushing TIME (which is constant change), multiplying it with some X/Y values to offset the UV coords allows us to move the pixels of the sun texture by a 0 to 1 multiplier offset from the Black and White noise texture.

You can see we just take the Red and Blue channels… this still gives 0 to 1 values, but Red is acting like X, and Blue as Y.

The full material is below.

So why is this good for Meta Quest 2. In short, the material only has a few instructions and works with basic Multiply and Adds and only using 2 textures. So runs nicely on mobile.

Unreal Engine material shader for a lava sun.

 

Unreal Engine Sun material in the sky