Material extension #2642
Replies: 3 comments
-
Absolutely shouldn't be index based. Having things be index based was a huge mistake from whoever thought of it first.. I already have an extension that does essentially this, it's for materials from web urls though. Could potentially get it into wire. |
Beta Was this translation helpful? Give feedback.
-
Fair enough. Just something to protect against collisions.
That's pretty good, but I was thinking something simpler(?) using in-game textures. Maybe could even combine the two. |
Beta Was this translation helpful? Give feedback.
-
Ofc they will have indexes internally, but that shouldn't be exposed to E2. It's bad design |
Beta Was this translation helpful? Give feedback.
-
Suggestion for a brand-new E2 Extension:
material
ormaterialcore
. Its purpose is quite simple, to create materials.Would need some restriction to avoid abuse but it should be overall somewhat simple. 16 is probably enough for default but a convar should be used.
The internal name of the material should probably be formatted something like
wire_playerAccountID_index
.Sample functions:
string = materialCreate(index, string basematerial, string shader, table args)
advanced format (basically 1:1 ofCreateMaterial
)string = materialCreate(index, string basematerial, width, height, x, y)
simple format (shader defaults to vertexlitgeneric)materialSetParam(index, string key, string value)
sets a single shader parameterNot sure if the shader parameter will cause any issues, just thought it could be neat.
Beta Was this translation helpful? Give feedback.
All reactions