Jump to content

Shaders and .vtf Format


steadyfi

Recommended Posts

Posted

I saw a server called Top-GTA, a MTA DayZ server, that uses shaders stored in the format of .vtf.

The .vtf format stands for Valve Texture Format (Outside Link), but the files they use are not common VTF Files, they are somehow modified and not conventional.

As far as I tried, no Standard VTF Editor/Viewer can read from them, which lead me to the idea that they are somehow Invalid, for the .vtf format, but valid for MTA to load them.

Also, MTA wouldn't be able to load conventional VTF Files, as they are newer technology, they are meant especially for the Valve Source Engine, and RenderWare (GTA SA Engine) wouldn't be able to handle them.

I tried to load them, it kinda worked, but the Texture doesn't apply.

The object remains white.

local shader = dxCreateShader("world.fx"); 
local texture = dxCreateTexture("test.vtf", "argb"); 
dxSetShaderValue(shader, "gTexture", texture); 
engineApplyShaderToWorldTexture(shader, "desgrassbrnsnd"); 

If any of you know, I would like to hear what you say.

Thanks :D

My Work:

OpenTeams | DayZ Admin Panel | vAuth

Must-Have Library: MTA Lua Async

ApocalipZ Owner

coming back soon!

Posted

Shaders working with MTA are stored in .fx file. The .vtf is a texture format not compatible with MTA. I'd suggest finding a photoshop/gimp plugin for vtf. Open the file and save as jpg/png/dds.

I make shaders .. mainly. My community resources

I'll do some custom stuff, I'm open for cooperation.

Posted
Shaders working with MTA are stored in .fx file. The .vtf is a texture format not compatible with MTA. I'd suggest finding a photoshop/gimp plugin for vtf. Open the file and save as jpg/png/dds.

I use gimp but keep saying File signature does not match 'VTF'.

Resources I made:

Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!

 

Posted (edited)
To open with gimp you'll need a plugin for that (as i mentioned before)

I downloaded a vtf plugin for gimp I am not stupid, but didn't work...

Edited by Guest

Resources I made:

Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!

 

Posted
is there anyway to change the size of the original texture? the vtf loads, but its white i think its because of the size difference, i could be wrong tho

It's white because aren't loaded correctly.

Resources I made:

Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!

 

Posted
if you place a png with the wrong size the same thing happens... so thats why i say maybe thats the reason if you look at top-gta's texture theyre VERY highres unlike the original textures on sa models

The problem here is because we don't know how to use those *.vtf files.

Resources I made:

Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!

 

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...