multitheftauto / mtasa-resources

This project maintains a list of up-to-date resources that come with Multi Theft Auto.
https://multitheftauto.com
MIT License
151 stars 151 forks source link

Resource to create, modify material #421

Closed CrosRoad95 closed 8 months ago

CrosRoad95 commented 1 year ago

Everyone who tried to make something related to shaders in mta know they are hard. An idea i'm proposing is to add a resource that goal is to make different materials ( backed by shaders ) simillar to what most game engines do. So for example

local material = exports.materials:createBlankMaterial()
exports.materials:setMaterialDiffuse(material, tocolor(255,0,0,255))
exports.materials:setMaterialTexture(material, 0, "mreow.png")
engineApplyShaderToWorldTexture(material, object)

this is simple example, but it might support simillar functionality to game engines such a blending, animations, multiple textures ect.

jlillis commented 8 months ago

Closing this feature proposal for now. If anyone wants to reopen it with a PR go ahead.