View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0018444||Runner||[All Projects] Shaders||Public||2015-07-20 11:01||2016-11-30 14:38|
|Reporter||GamerXP||Assigned To||Mike Rennie|
|Target Version||Fixed in Version|
|Summary||0018444: Suggestion: Shaders: Shader Callback to return the current shader|
|Description||Hello. When I was making an custom drawing system for GM, I found some inconvinient parts about it. And I got some suggestions for the future:|
Just a simple function, that will return index of currenlty used shader. That will be convinient to have if you want to check if shader was changed. Maybe even a callback event for changing shader as well, but it's less critical.
Why? Let's say you want to update uniforms if shader was switched. Making own global variable for currently used shader will work as long as you use only your own shader switching functions. But you can't say if user won't change shader using shader_set somewhere outside. And there is no way to check it right now.
|Additional Information||Original helpdesk ticket: http://help.yoyogames.com/tickets/88948|
|1.4 Found In||1.4.1598|
|2.x Runtime Found In|
|2.x Runtime Verified In|
||We should have a shader_current() or some such allowing us to get the currently set shader|
Will be nice to have.
Also, sorry to write it here, but those are connected issues (at least for me):
This one got closed for not good reason, and I can't add a comment myself.
"sprite_get_texture will return the texture on which that frame of the sprite exists - different frames may be on different textures"
It returns different results even if sprites are on same page.
||I've added the shader_current() function which returns the currently set user shader.|