How do I rotate around the X axis in a vertex shader?

The Unity Skybox shader makes use of a vertex shader to rotate the skybox about the Y Axis (Heading).

The function is here :

	float4 RotateAroundYInDegrees (float4 vertex, float degrees)
	{
		float alpha = degrees * UNITY_PI / 180.0;
		float sina, cosa;
		sincos(alpha, sina, cosa);
		float2x2 m = float2x2(cosa, -sina, sina, cosa);
		return float4(mul(m, vertex.xz), vertex.yw).xzyw;
	}

How do I adjust this to rotate around the X Axis? I understand that the 2x2 rotation matrix is the same, but I’m a little confused by the use of quaternions in the final rotation.

I was trying to do the same thing but couldn’t figure out how completely in the shader. However, the method of generating a matrix on the CPU and passing it to the shader worked for me to have a custom skybox rotation.

float3 RotateAroundZInDegrees (float3 vertex, float degrees)
{
float alpha = degrees * UNITY_PI / 180.0;
float sina, cosa;
sincos(alpha, sina, cosa);
float2x2 m = float2x2(cosa, -sina, sina, cosa);
//return float3(mul(m, vertex.xz), vertex.y).xzy;
return float3(mul(m, vertex.xy), vertex.z).zxy;
}