Jump to content

2D Point always same size in a 3D Mesh


Recommended Posts


I'm trying to create a 2D point (or circle) on a mesh, but I need it will be the same size (maybe in pixel). Do you know how to do it? Now, I'm trying to create and sphere and use fragment shader for the color, but as you can see, the 2D Point changes depending of the camera position. Any idea?






Screen Shot 2018-11-17 at 7.06.40 PM.png

Link to comment
Share on other sites

hmm :)  you r good in making challange :)


p1 is object center position   

but for make exact circle may be we use gl_FragCoord

gl_FragCoord base on pixels so that can make  i need think about that :)

https://www.babylonjs-playground.com/#1KUUC3#8 that is close too 

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...