{"action":"created","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/15450","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/15450/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/15450/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/15450/events","html_url":"https://github.com/godotengine/godot/issues/15450","id":286582842,"node_id":"MDU6SXNzdWUyODY1ODI4NDI=","number":15450,"title":"Cannot use TEXTURE_PIXEL_SIZE and the like in canvas_item vertex shader","user":{"login":"Zylann","id":1311555,"node_id":"MDQ6VXNlcjEzMTE1NTU=","avatar_url":"https://avatars1.githubusercontent.com/u/1311555?v=4","gravatar_id":"","url":"https://api.github.com/users/Zylann","html_url":"https://github.com/Zylann","followers_url":"https://api.github.com/users/Zylann/followers","following_url":"https://api.github.com/users/Zylann/following{/other_user}","gists_url":"https://api.github.com/users/Zylann/gists{/gist_id}","starred_url":"https://api.github.com/users/Zylann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zylann/subscriptions","organizations_url":"https://api.github.com/users/Zylann/orgs","repos_url":"https://api.github.com/users/Zylann/repos","events_url":"https://api.github.com/users/Zylann/events{/privacy}","received_events_url":"https://api.github.com/users/Zylann/received_events","type":"User","site_admin":false},"labels":[{"id":73330066,"node_id":"MDU6TGFiZWw3MzMzMDA2Ng==","url":"https://api.github.com/repos/godotengine/godot/labels/enhancement","name":"enhancement","color":"44bbff","default":true},{"id":279098111,"node_id":"MDU6TGFiZWwyNzkwOTgxMTE=","url":"https://api.github.com/repos/godotengine/godot/labels/topic:rendering","name":"topic:rendering","color":"ffdd44","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/godotengine/godot/milestones/7","html_url":"https://github.com/godotengine/godot/milestone/7","labels_url":"https://api.github.com/repos/godotengine/godot/milestones/7/labels","id":2529217,"node_id":"MDk6TWlsZXN0b25lMjUyOTIxNw==","number":7,"title":"3.1","description":"","creator":{"login":"akien-mga","id":4701338,"node_id":"MDQ6VXNlcjQ3MDEzMzg=","avatar_url":"https://avatars0.githubusercontent.com/u/4701338?v=4","gravatar_id":"","url":"https://api.github.com/users/akien-mga","html_url":"https://github.com/akien-mga","followers_url":"https://api.github.com/users/akien-mga/followers","following_url":"https://api.github.com/users/akien-mga/following{/other_user}","gists_url":"https://api.github.com/users/akien-mga/gists{/gist_id}","starred_url":"https://api.github.com/users/akien-mga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akien-mga/subscriptions","organizations_url":"https://api.github.com/users/akien-mga/orgs","repos_url":"https://api.github.com/users/akien-mga/repos","events_url":"https://api.github.com/users/akien-mga/events{/privacy}","received_events_url":"https://api.github.com/users/akien-mga/received_events","type":"User","site_admin":false},"open_issues":776,"closed_issues":4951,"state":"open","created_at":"2017-05-18T13:33:56Z","updated_at":"2018-12-17T09:40:47Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2018-01-07T16:55:33Z","updated_at":"2018-12-17T09:42:12Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Godot 3.0 beta 2\r\nWindows 10 64 bits\r\nnVidia geforce 940M\r\n\r\nEDIT: these are available in fragment shader, so that would be a feature request. Which is certainly doable IMO because that option has to come from an internal `uniform`.\r\n\r\nThis builtin variable can be used in 2.1.4 to get the size of one pixel in a shader so we don't need to pass the size of the texture everytime. It's hightlighted in 3.0 but not recognized:\r\n\r\n![image](https://user-images.githubusercontent.com/1311555/34651719-f269b858-f3d3-11e7-90bc-b1b7f8a8cc19.png)\r\n\r\nThe same goes for `SCREEN_PIXEL_SIZE`.\r\nThe use case here is to displace UVs in the vertex shader (which is obviously less costy than the pixel shader and less boilerplate to get world positions etc).\r\n\r\n```\r\ntype is: canvas_item\r\n0 shader_type canvas_item;\r\n1\r\n2 void vertex() {\r\n3       UV.x = VERTEX.x * TEXTURE_PIXEL_SIZE;\r\n4 }\r\n5\r\nSCRIPT ERROR: (null): Unknown identifier in expression: TEXTURE_PIXEL_SIZE\r\n          At: :4\r\nERROR: RasterizerStorageGLES3::_update_shader: Condition ' err != OK ' is true.\r\n   At: drivers\\gles3\\rasterizer_storage_gles3.cpp:1671\r\n```\r\n  \r\n  "},"comment":{"url":"https://api.github.com/repos/godotengine/godot/issues/comments/447781345","html_url":"https://github.com/godotengine/godot/issues/15450#issuecomment-447781345","issue_url":"https://api.github.com/repos/godotengine/godot/issues/15450","id":447781345,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0Nzc4MTM0NQ==","user":{"login":"ywaby","id":12198203,"node_id":"MDQ6VXNlcjEyMTk4MjAz","avatar_url":"https://avatars3.githubusercontent.com/u/12198203?v=4","gravatar_id":"","url":"https://api.github.com/users/ywaby","html_url":"https://github.com/ywaby","followers_url":"https://api.github.com/users/ywaby/followers","following_url":"https://api.github.com/users/ywaby/following{/other_user}","gists_url":"https://api.github.com/users/ywaby/gists{/gist_id}","starred_url":"https://api.github.com/users/ywaby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywaby/subscriptions","organizations_url":"https://api.github.com/users/ywaby/orgs","repos_url":"https://api.github.com/users/ywaby/repos","events_url":"https://api.github.com/users/ywaby/events{/privacy}","received_events_url":"https://api.github.com/users/ywaby/received_events","type":"User","site_admin":false},"created_at":"2018-12-17T09:42:12Z","updated_at":"2018-12-17T09:42:12Z","author_association":"NONE","body":"version: Godot 3.1 aphla 3\r\nsystem: debian buster\r\n\r\nstill has this problem. \r\nnot report error, but TEXTURE_PIXEL_SIZE value is 0"}}
{"actor":{"display_login":"ywaby"}}