polymod icon indicating copy to clipboard operation
polymod copied to clipboard

[ENHANCEMENT] Implement shaders modding support

Open DotWith opened this issue 3 years ago • 2 comments

Modifying shaders in runtime. This would be widely expandable to modding custom levels, objects, etc. Other platforms that don't support shaders may need restrictions. The file extensions for shaders are as followed .frag and .vert.

DotWith avatar Dec 29 '21 02:12 DotWith

I investigated this at one point but never figured it out. It should be a matter of just opening a .frag and .vert yourself then loading it as a shader.

I did ask about it on the forums at one point and maybe the responses can help you.

https://community.openfl.org/t/how-to-load-gl-shaders-from-a-string/13298

EliteMasterEric avatar Dec 29 '21 16:12 EliteMasterEric

This modification of the openfl shader seems to get the job done. https://github.com/gedehari/IzzyEngine/tree/master/source/openfl/display

DotWith avatar Dec 30 '21 20:12 DotWith