You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I took the linePerspective example and added push and pop around the block of drawing boxes. When toggling linePerspective, the strokes inside the the push pop boundary are not being affected. I added another box (green) outside the boundary, which seems to get affected correctly. https://editor.p5js.org/TiborUdvari/sketches/NcnxLpEum
I think the big issue is that in the current state anything inside a push-pop boundary will have linePerspective on.
This noticed this with v1.9.2 for p5.xr as it was using a custom camera and thus uniform strokes (cf snippet below). As there seem to be some issues with the line rendering as I mentioned here #7200, I wanted to get this mode working first.
p5.shader v1.9.1
if(this.isStrokeShader()){if(this._renderer._curCamera.cameraType==='default'){// strokes scale up as they approach camera, defaultthis.setUniform('uPerspective',1);}else{// strokes have uniform scale regardless of distance from camerathis.setUniform('uPerspective',0);}}
Good catch! I think we may be missing this property in p5.Camera::set and p5.Camera::copy, so saving and restoring that property isn't working. I suspect adding it to those two spots should fix this!
Most appropriate sub-area of p5.js?
p5.js version
1.9.2
Web browser and version
No response
Operating system
No response
Steps to reproduce this
I took the linePerspective example and added
push
andpop
around the block of drawing boxes. When toggling linePerspective, the strokes inside the the push pop boundary are not being affected. I added another box (green) outside the boundary, which seems to get affected correctly.https://editor.p5js.org/TiborUdvari/sketches/NcnxLpEum
I think the big issue is that in the current state anything inside a push-pop boundary will have linePerspective on.
This noticed this with v1.9.2 for p5.xr as it was using a custom camera and thus uniform strokes (cf snippet below). As there seem to be some issues with the line rendering as I mentioned here #7200, I wanted to get this mode working first.
p5.shader v1.9.1
p5.shader v1.9.2
Right now the useLinePerspective always sends in true for things inside push pop, I can't quite understand why just yet.
The text was updated successfully, but these errors were encountered: