larsiusprime / polymod

Atomic modding framework for Haxe
MIT License
161 stars 62 forks source link

[ENHANCEMENT] Implement shaders modding support #83

Open DotWith opened 2 years ago

DotWith commented 2 years ago

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.

EliteMasterEric commented 2 years ago

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

DotWith commented 2 years ago

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