![]() ![]() I've pretty much been leaning on going with Godot, but I'm hoping I can figure out a way to do this efficiently, otherwise I'm gonna have to look at another engine. I really figured something like this would be a no-brainer in any engine. 2 pallete swapping with a shader is actually really easy. So I think I have a bit of an understanding how the shader method works, but the idea of layering up double assets feels icky, ontop of needing to make an extra set of hungreds of assets for the shader to apply colors to. Let me show you an example of a pallete swap fragment shader. That's it It's very short and super efficient. The idea here is to use the red channel (actually you can use any one of them) of the base color to index a color from the color palette. There are ways from what I'm told me make the engine load images specifically to gather color data, but it involves rewriting how the engine loads images, using one image as palette info, and then recognizing each color on all assets in the group and automatically makes the shade change those colors, which I doubt I'm gonna figure out any time soon. So, I'm probably gonna be stuck going with the mask route. While you're at it, change the "i<=n" conditional in the for statement with "i guess since I'm stuck doing this with most engine choices, I guess I'll move forward keeping this in mind. Anything would work as long as it's not the same source-you can't really merge all palettes onto a single sprite subimage without modifying how the shader works. ![]() in your game just change the currentpalette value to something within your palette sprites bounds and make sure it is a float with. One source (sprite, subimage, surface, etc.) per palette. 3D Game Maker - Free download as PDF File (.pdf), Text File (.txt) or read. That part at least was made clear in the tutorial. When youre in TEST mode you can swap to a Full Screen display by pressing the. You would then modify what texture is being set as the stage accordingly. If you have the basemap on index 0 and destination palette on index 1 of spr_palette, then you'll change "sprite_get_texture(spr_palette, 0)" with "sprite_get_texture(spr_palette, 1)" to modify the output palette. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |