Is there a way to check if player is with certain gun inside a shader?

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
ibm5155
Posts: 152
Joined: Tue Oct 25, 2011 13:05

Is there a way to check if player is with certain gun inside a shader?

Post by ibm5155 » Wed Aug 03, 2016 17:37

or some true/false var that a shader could check that was send by the player?

I plan (if pocible) to introduce inside the float R_DoomLightingEquation(float light) function a flash light function :)

User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Is there a way to check if player is with certain gun inside a shader?

Post by Graf Zahl » Wed Aug 03, 2016 20:18

No. The shader has no means to access game data. If you need that you'll have to change the engine and add a new shader parameter.

ibm5155
Posts: 152
Joined: Tue Oct 25, 2011 13:05

Re: Is there a way to check if player is with certain gun inside a shader?

Post by ibm5155 » Thu Aug 04, 2016 1:36

oh :( ,well, is at least a way to get the camera and pitch?

User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Is there a way to check if player is with certain gun inside a shader?

Post by Graf Zahl » Thu Aug 04, 2016 7:15

The camera position is passed to the shader which is needed for distance calculations. The pitch is not.

Locked

Return to “GZDoom”