Jump to content

Is this possible?


Recommended Posts

Posted

So, first of all we need a shader. And don't forget download the mta-helper.fx file. Next, we need to use following functions:

dxCreateShader
dxSetShaderValue
engineApplyShaderToWorldTexture

 

This is my GitHub repository where you can find a lot of my work. And this is my YouTube channel with reviews of some resources. Good luck and enjoy MTA!

Posted (edited)

Okay, I have made an example for you:

local yourColor = { 1, 0, 0, 1 }
local textureName = ""

local shader = dxCreateShader("putYourShaderHere.fx", 0, 0, false, "object")
if shader then
	dxSetShaderValue(shader, "theColorYouWant", unpack(yourColor))
	engineApplyShaderToWorldTexture(shader, textureName)
end

The "textureName" parameter you should find out with the resource named shader_tex_names. Just start the resource, walk up towards your object 689 and find the name by scrolling a list. Of course you also should download the shaders I can gave and put them in a resource folder(the shader should be named "putYourShaderHere.fx". And don't forget about a meta file. Good luck!

Edited by TEDERIs

This is my GitHub repository where you can find a lot of my work. And this is my YouTube channel with reviews of some resources. Good luck and enjoy MTA!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...