codingjoe Posted August 25, 2020 Share Posted August 25, 2020 Hey there, I`m currently working on a perspective transform with pixi. I found the example here: https://pixijs.io/examples/#/plugin-projection/quad-bi.js Problem: The image is not drawn cleanly on the edge, even when setting antialias: true So now i thought about using a mesh or SimplePlane to make the edges smooth (example: https://codepen.io/osublake/pen/gLGYxx) I only have 8 points to draw the mesh. Is that possible? What would be the best approach to this? Thanks Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted August 26, 2020 Share Posted August 26, 2020 Bilinear shader is difficult thing, you can add smoothing there if you understand how it works, however, why do you even need it? codingjoe 1 Quote Link to comment Share on other sites More sharing options...
codingjoe Posted August 26, 2020 Author Share Posted August 26, 2020 @ivan.popelyshev Thanks for your reply. Tbh I don`t know if I need it. I just want to make the edges cleaner. The 2D quad bilinear gives me 8 observable points, so I thought it might be possible to create a SimplePlane from these (I thiought the verticles would help), but I couldn't do it. I`m a beginner so I don`t know if that even makes sense. How would you solve the problem? The grid gutter in the picture should be interchangeable with any picture. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted August 26, 2020 Share Posted August 26, 2020 (edited) Just in case, there's a difference between bilinear (Sprite2s) and usual homogeneous projection (Sprite2d), and in your case it should be homogeneous. "antialias:true" webgl context flag will work with this. Where are those 8 points here, i see only 4 Edited August 26, 2020 by ivan.popelyshev Quote Link to comment Share on other sites More sharing options...
codingjoe Posted August 26, 2020 Author Share Posted August 26, 2020 yeah, my bad. There are only 4 Points. Is it possible to draw a Sprite2d with those? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted August 26, 2020 Share Posted August 26, 2020 (edited) https://pixijs.io/examples/#/plugin-projection/quad-homo.js , when i specify antialias:true in app params - it works. Edited August 26, 2020 by ivan.popelyshev codingjoe 1 Quote Link to comment Share on other sites More sharing options...
codingjoe Posted August 26, 2020 Author Share Posted August 26, 2020 @ivan.popelyshev brilliant, thanks for the help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.