gl_PointCoord Shader Always Reports 0

I’m currently writing an application that I’m testing as I write on several different computers. I develop the application myself on a Mac M1, but then test mainly on Windows PCs. On (at least) one computer, there is a problem with gl_PointCoord . I tested it on Apple M1 (driver version: 4.1 Metal - 83.1) and some other high-end Windows PCs and everything is OK. On the other hand, on one laptop (also Windows, new, very good, but not gaming, vendor: ATI Technologies Inc, renderer: AMD Radeon Graphics, driver version: 4.6.0 Compatibility Profile Context 22.40.01.54.230214) in the gl_PointCoord shader always reports 0 . What could it be?

The problem with laptops is that they independently switch to the built-in graphics card in the processor. Maybe that’s the point. You should make sure that you are using an external video card, in this regard, in the latest panda update, an appropriate flag was added. Only I have no idea where it is.

Doing some searching, it also looks as though there may be a driver bug related to some ATI devices that can result in this effect.

However, I don’t know how accurate this information is, or whether your device is one of the affected–perhaps another forum-member will have more information!

On some cards you need to enable point sprites explicitly, which is done by assigning the appropriate TexGenAttrib - try that.

2 Likes

Thank you! Yes, it helped!
For posterity ;-), if anyone is looking for it - just after loading the model (let’s call it model) give:

model.setTexGen(TextureStage.getDefault(), TexGenAttrib.MPointSprite)
2 Likes