BunnyCinnamon / Improbable-plot-machine

Ancient Technology
MIT License
4 stars 2 forks source link

Add mirror module #3

Closed Katrix closed 6 years ago

Katrix commented 6 years ago

Adds the Mirror module so you can begin working with that instead. Ask me if you need help with any of the changes I made.

BunnyCinnamon commented 6 years ago

I originally wanted this to be a standalone mod.... hence why I dont use CTM. Even if I'm not going to use all of it... is that a valid reason to depend on another mod? :/

Katrix commented 6 years ago

I mean sure it is, and you do have a lot of code in common with Mirror. The big point with the project was to remove duplicate code that spanned multiple projects. I don't see how depending on another mod is such a bad thing. It leaves more time coding the cool content, and less time worrying about all the extra cruft (which if there is a bug, it will be fixed in all places much quicker).

Also, the only real thing you don't use from this would be the shaders and VBO stuff.

BunnyCinnamon commented 6 years ago

Hmpf, I see

BunnyCinnamon commented 6 years ago

Oh yeah, I changed how the baked models work, in case you want to move that over to mirror

BunnyCinnamon commented 6 years ago

Im still not convinced tho :<

BunnyCinnamon commented 6 years ago

Oh, can I apply a simple alpha color shader to do the same effect as what I do here, using your shader system? @Katrix- https://github.com/ArekkuusuJerii/Solar/blob/master/src/main/java/arekkuusu/solar/client/util/helper/RenderHelper.java#L165-L175

Katrix commented 6 years ago

Should be possible. Mirror currently provides it's own ShaderManager. It's still not the best to use from Java, but I'll look into fixing that. You have two options when working with programs here. Either you can just get a linked program and handle updating and destroying it yourself, (done by calling createProgram), or you can instruct the ShaderManager of how to compile the shader by calling initProgram. You then later get the shader by calling getProgram.

If you instead want something similar to minecraft shaders, Mirror also has a simple wrapper around those in ShaderHelper

I still haven't written much documentation there, so ask if there is anything you're unsure about. Also, don't be afraid to bring it to the Discord.

BunnyCinnamon commented 6 years ago

Niceee I like it. Thanks Kat.