We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2836a71 commit 8afb45cCopy full SHA for 8afb45c
sketches/shaders/box-space/shader.frag
@@ -82,10 +82,14 @@ void main() {
82
83
vec2 uv = ( coord * 2.0 - 1.0 ) * iResolution.xy / iResolution.y;
84
85
+ vec2 mousePrevious = vec2(0.0, 0.0);
86
vec2 m = (iMouse.xy * 2. - iResolution.xy) / iResolution.y;
87
88
+ mousePrevious = m;
89
// Default circular motion if mouse not clicked
- if(!iView) m = vec2(-1.0, 0.0);
90
+ if(!iView) {
91
+ m = mousePrevious;
92
+ }
93
94
vec3 ro = vec3(0.0, 0.0, -3.0); // ray origin
95
vec3 rd = normalize(vec3(uv, 1.0)); // ray direction
0 commit comments