mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-01 01:46:39 +01:00
clean shader code
This commit is contained in:
parent
a52b606208
commit
91069163f8
1 changed files with 4 additions and 2 deletions
|
@ -37,12 +37,14 @@ void main()
|
||||||
{
|
{
|
||||||
vec3 rot = fract(rotationDegrees / 360.) * PI * 2.;
|
vec3 rot = fract(rotationDegrees / 360.) * PI * 2.;
|
||||||
|
|
||||||
vec4 renderPos = rotate(vec3(1, 0, 0), rot.x) * rotate(vec3(0, 0, 1), rot.z) * rotate(vec3(0, 1, 0), rot.y) * vec4(aPos - vec3(0.5), 1f);
|
mat4 rotation = rotate(vec3(0, 1, 0), rot.y) * rotate(vec3(0, 0, 1), rot.z) * rotate(vec3(1, 0, 0), rot.x);
|
||||||
|
|
||||||
|
vec4 renderPos = rotation * vec4(aPos - vec3(0.5), 1f);
|
||||||
renderPos += vec4(instancePos + vec3(0.5), 0);
|
renderPos += vec4(instancePos + vec3(0.5), 0);
|
||||||
|
|
||||||
float scrollSize = scrollTexture.w - scrollTexture.y;
|
float scrollSize = scrollTexture.w - scrollTexture.y;
|
||||||
|
|
||||||
float scroll = fract(speed * time / (36. * 16.)) * scrollSize * scrollMult;
|
float scroll = fract(speed * time / (36 * 16.)) * scrollSize * scrollMult;
|
||||||
|
|
||||||
Light = light;
|
Light = light;
|
||||||
TexCoords = aTexCoords - sourceUV + scrollTexture.xy + vec2(0., scroll);
|
TexCoords = aTexCoords - sourceUV + scrollTexture.xy + vec2(0., scroll);
|
||||||
|
|
Loading…
Reference in a new issue