0 votes

The canvas_item shader docs mention the built-in POINT_COORD for both the fragment and the light processor function. The descriptions in the docs are:

  • for fragment: in vec2 POINT_COORD Coordinate for drawing points.
  • for light: in vec2 POINT_COORD UV for Point Sprite.

I don't get what is the purpose of this variable. I've done quite some experiments to find out what it could be doing, but it looks like the values are always zero.

What is the meaning of this variable? Are there any examples of how to make use of it?


What I have found out so far:

This question suggests that it has something to do with "point sprites" (which I can't find any documentation for either) and with the POINT_SIZE built-in for the vertex processor function (which I tried to set, but also no effect). The example of this related GitHub issue is unfortunately missing some files so that I could learn from it either.

in Engine by (38 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.