How to do material (or shader) don't be affected by light ? (BrawlBox)

Started by iyenal, April 29, 2016, 04:07:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

I don't believe the Wii system is the same. In Unity, adding those lighting shaders will use up more data than using the default shaders(I use Unity, too), but in an MDL0 file, from what I understand, the materials and shaders take up the same amount of space regardless of which one you use, because these ones are just set up like booleans for their options; it's basically "Does this reflect light?" "Yes" or "No", as opposed to Unity's "Does this reflect light?" "If yes, How much?"

Post Merge: May 03, 2016, 04:12:16 PM

And you can improve performance by importing models with later versions of BrawlBox(.71, I think, has the optimization), because it will auto-optimize the model for you, and you can also lower the poly-count before importing, and you can also lower the texture resolution, as well.

OK now I understand. I can use light shader without problem, but in an OpenGX documentation I saw that more there are stages in shader, more is slow, is it true ? ;if yes how to do a performant shader with the less calculations possible ?

Quote from: iyenal on May 03, 2016, 02:30:34 PM
@BlackJax96 But the problem is thawhen you disable the lightchannel, the shader rest so performance aren't ameliored.

In fact, I want an shader that is doesn't affected by light so all the calculs related to lighting isn't done, so I can use more polygons. But if you know an other way to ameliore performance without removing polygons and textures tell me please.

Well as long as you're fine rendering the model without using any vertex colors or a solid material color, just don't use RasterColor or RasterAlpha as an input in the stages of your shader(s) and instead only pass texture color/alpha through SelectionD without multiplying it by RasterColor/Alpha.

Also you're not going to notice much of a performance hit if you enable lighting or if you add another shader stage or two in comparison to adding vertices to the model. Vertices are much more costly to performance.

Yes; the two ways that most lower the filesize are lowering polycount and texture res.

Post Merge: May 04, 2016, 01:44:43 AM

I use lowered texture res a lot when a file is too big or too laggy, since it's much easier than the lowering of the polycount, but lowering the polycount is better for lower lag while still being fairly detailed.