Jump to content

Ren_712

Members
  • Posts

    327
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Ren_712

  1. Have You seen the conterstrike renderware gamemode ? https://forum.multitheftauto.com/viewto ... 08&t=72068 I think the maps might work great with it.
  2. Many people don't seem to notice that when creating shader that will be applied to peds one needs to state an optional argument elementType = "ped". Allso when you apply that shader to ped texture - i guess you would also state the element this shader is applied to as well. There is an interesting example - done for vehicle lights - you should check it out.
  3. The map has just been released to the MTA community. Get it here: viewtopic.php?f=93&t=84859
  4. 1. Get an original texture 2. Get texture name 3. Modify the texture to fit your expectations 4. apply shader to world texture per entity and dxSetShaderValue or something 5. ???? 6. PROFIT! i don't know how to help. This video might do:
  5. Map by : GodFather Textures by : GhostRider aka kamisakea Shaders & scripts by : AngerMAN aka Ren712 RULES: You may not do absolutely nothing with the texture and map files, unless you are given permission by their authors. You can use shaders and scripts with no permission - however, please add a comment regarding their source. download : http://www.dropbox.com/s/h23y56z8w0cq3p ... m.zip?dl=0
  6. The clothes are only for CJ. Every model has (usually) 1 texture. There is a function to get texture names for a model by id. And this you'll use to replace the original ped texture with your own. // // texRep.fx // // //------------------------------------------------------------------------------------------ // Shader Settings //------------------------------------------------------------------------------------------ texture gTexture; //------------------------------------------------------------------------------------------ // Techniques //------------------------------------------------------------------------------------------ technique TexReplace { pass P0 { Texture[0] = gTexture; } }
  7. addEventHandler( "onClientResourceStart", resourceRoot, function() -- Create shader local myShader, tec = dxCreateShader ( "myshader.fx" ) if not myShader then outputChatBox( "Could not create shader. Please use debugscript 3" ) else outputChatBox( "Using technique " .. tec ) -- get texture and set dxSetShaderValues local additionalTexture = dxCreateTexture ( "texture.png" ); dxSetShaderValue ( myShader, "gAdditionalTexture", additionalTexture ); dxSetShaderValue ( myShader, "posAdd", 1,1 ); -- Apply to global txd engineApplyShaderToWorldTexture ( myShader, "myWorldTextureName" ) end end ) Like this. Dood - read some wiki, look at the examples. What i post above is supposed to give you some idea.
  8. If it is a world texture then this might be enough: http://pastebin.com/CP3Ujccx This lerps between the original texture and an additional one (by the alpha channel of the additional texture). Use gColorMult to manipulate all the colors and alpha. Manipulating the alpha - sets whether you want to see the original or the additional. You can rescale the texture uv to make it fit.
  9. That's an interesting idea. Good luck with that.
  10. you apply shader to world, ped and vehicle textures etc .. - also can restrict it to certain created elements. I think what you meant (about the disco shader) was - can you change the light effect position - and the answer is yes.
  11. I think he wants the text to be drawn like dxDrawText but in 3d world like line material.
  12. Ren_712

    Light mapping

    So they are baked in 3ds (or some other software), saved as a texture, applied per object texture using MTA shader functions. Means that a modeler should consider that concept when creating the model - 1 color texture and 1 shadow texture per model ? Or at least the textures shouldn't repeat on other faces of the model ? What about baking - Do You automatize the process for a number of entities ?
  13. As You noticed - setting object alpha doesn't necessary make it render after the background objects (unlike peds and vehicles). You shouldn't setElementAlpha to 254 for objects - it makes the layered effect render before everything else. A trick would be to use model replace functions https://wiki.multitheftauto.com/wiki/EngineReplaceModel. Notice the alphaTransparency flag - set it to true. Currently this is an only solution for the problem. So yeah, extract the model from gta3.img (or wherever it is) and replace it with itself using said EngineReplaceModel function. Or maybe just setting the element alpha back to 255 would be enough ?
  14. Use that for client-side files - like textures, models, sounds, fonts etc. https://wiki.multitheftauto.com/wiki/DownloadFile https://wiki.multitheftauto.com/wiki/On ... adComplete Store the urls and inResource directories in a table.
  15. I've got 38 png files ( 3,25MB). I'm applying these textures to models (using shaders). I've noticed that converting them from argb to DXT1 (90% of them) DXT3/DXT5: - Makes it 5 times longer to load (unless i also convert the files from png to dds) - Takes 1/6 of the memory - Saves 4 FPS average
  16. You can't do that. Unless you handle resource downloading with functions introduced in mta 1.4.
  17. Whatever works is enough. You might do it as You already mentioned or You could create 4 layered shaders - that will work in separate passes [shader1 = dxCreateShader("shader.fx",0,0,layered = true) ... and so on] These 2 methods create the same results, Of-course, you'll always have to deal with z-fighting (just like using 1 shader effect with multiple passes). (To avoid Z fighting artifacts, you may have to add DepthBias=-0.0002 ; to the technique pass [multiply the value by 2 for another pass]) Instead of creating separate vertex shaders. Or just pass some value to the vertexShader function in the technique passes - then you'll need only a single function - look into shader_radial_blur for an example. https://nightly.multitheftauto.com/files/shaders/ ... l_blur.zip
  18. Png with an alpha channel should work nicely as is. If you add the shader to world texture then don't forget to add AlphaRef = 1; AlphaBlendEnable = True; to your pass.
  19. Ren_712

    Shader

    The texture alpha should stay as it is. But you've started off with a good idea. Ive added 2 variables - sSnowAdd, sSnowMult to alter the snow amount a bit. Just search for any ground texture names, create an additional shader for them and manipulate the variables. http://pastebin.com/iZLF4bqu
  20. Yeah that was one of my first ideas, but I don't want to cause any possible performance issues with the client. Still I can agree with you on this one, but I will avoid it until I know there is no other answer. I would prefer to download the 5kb also over this idea, but gj anyway. Look below: This gave me an idea. Since You need shaders to apply the texture to the entity anyway, how about changing texture filtering modes as well. http://msdn.microsoft.com/en-us/library ... 85%29.aspx // // Example shader - filter_simple.fx // /////////////////////////////////////////////////////////////////////////////// // Global variables /////////////////////////////////////////////////////////////////////////////// texture gCustomTex0 : CUSTOMTEX0; /////////////////////////////////////////////////////////////////////////////// // Techniques /////////////////////////////////////////////////////////////////////////////// technique hello { pass P0 { // Set the texture Texture[0] = gCustomTex0; MinFilter[0] = Point; MagFilter[0] = Point; } }
  21. Well. If you want to see the bloom effect outside the texture ventricles then there is not much to help. You could apply a layered effect to the texture you want to 'have the bloom effect' - the 'current' should be applied to world texture instead drawn as an image. And shouldn't be rendered at every frame - just on any changes of the renderTarget.
  22. https://wiki.multitheftauto.com/wiki/EngineLoadTXD https://wiki.multitheftauto.com/wiki/EngineReplaceModel https://wiki.multitheftauto.com/wiki/EngineReplaceCOL A potem tworzysz obiekt o danym ID.
  23. ULTRAMEN - onClientElementStreamIn and onClientElementStreamOut You'll also have to reverse what was done when the element is streamed in. Search for removeShaderFromWorldTexture and destroyElement.
  24. You can replace textures using mta shader functions - per texture or/and per entity. search shader and shader_examples on mta wiki for more info. Shader effects can be used in resources (not as plugins) btw.
×
×
  • Create New...