-
Posts
327 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Ren_712
-
You can update mirror matrix for every frame, so technically yeah. Problem would be that objects outside the viewport get culled - try creating a mirror in a spawnarea and you'll see what i mean.
-
You can update mirror matrix for every frame, so technically yeah. Problem would be that objects outside the viewport get culled - try creating a mirror in a spawnarea and you'll see what i mean.
-
Camera2RenderTarget: https://community.multitheftauto.com/in ... s&id=12927
-
Camera2RenderTarget: https://community.multitheftauto.com/in ... s&id=12927
-
You can create a timer and change the shader values depending on the in game time.
-
If the texture is dark then you might want t replace it (use the shader i posted before)
-
so you have a variable float4 sLightColor. You can set all 4 color components (red - green - blue - alpha). Have in mind that unlike in MTA - the maximum value for the color is 1. For example: setShaderValue(myShader,"sLightCoor",1,0,0,1) - only red and alpha components are passed. Which will make the white texture appear red. setShaderValue(myShader,"sLightCoor",1,1,0,1) - will make it look yellow.
-
My bad. I thought you wanted to replace the texture as well. If so, then you'll need set shader value for "sTex0". If you don't set it - the texture will appear black. Otherwise you could use this : http://pastebin.com/8ySMWAVq This doesn't require you to set anything.
-
http://pastebin.com/BbvqBHPr variables: texture sTex0, float4 sLightColor
-
engineApplyShaderToWorldTexture( shaderElement, "*", object)
-
PedWall: https://community.multitheftauto.com/in ... ls&id=7615
-
I've taken time to rewrite the object and ped effects. I have no idea why it didn't work - but after some tests with other people - the ped and object shaders work properly now.
-
the basic way would be dxDrawLine3D.Should get position of the surface (can't remember the function) along with it's normals. Seems quite tricky.
-
You can apply shader to an element (ped,vehicle,etc..). You create a ped (an element) and then: bool engineApplyShaderToWorldTexture ( element shader, string textureName [, element targetElement = nil, bool appendLayers = true ] )
-
I replaced the complete skin, suppose id 114. Now I want to replace the texture of the .txd file, using the shader. Which responsible parametr for this? wiki says: https://wiki.multitheftauto.com/wiki/DxCreateShader dxCreateShader ( string filepath [, float priority = 0, float maxDistance = 0, bool layered = false, string elementTypes = "world,vehicle,object,other" ] ) For backward compatibility (MTA 1.1) you don't need to set anything else than filepath. However - after introducing ability to apply to ped models - it's a MUST to specify that you want to apply shader to "ped". Look at shader examples on wiki: like Ped morph.
-
Is that a ped model You have replaced ? You will need to specify that in DxShader.
-
I do respect that you want to learn how to script. But seriously ... dxSetShaderValue - that's what you need, it's like with any other function. Just read the wiki page, not just copy and paste stuff. Think and learn - you will gain something by that. Unless you want a ready solution. But i need to be a little bit more motivated to do so.
-
your shader has only 2 variables: texture texture0; -- here goes screen float factor; -- here goes value (0 - 1) this instead of showCheese, and other weird stuff you set.
-
you can use this script: https://community.multitheftauto.com/in ... s&id=10163 there are some exported functions that let you create blur boxes But if You want to apply your shader to a screen space, then you'll find a good amount of help on wiki: https://wiki.multitheftauto.com/wiki/DxCreateShader https://wiki.multitheftauto.com/wiki/DxSetShaderValue Your texture0 should be the screenSource https://wiki.multitheftauto.com/wiki/Dx ... reenSource don't forget to update it. your 'blurfactor' should be set as well. (0 - 1) i guess
-
shameless bump: If the graphics card does not support MRT in shaders then i'd suggest using the nonMRT option. createPreview(...,false) instead of default 'true'. I have released a new version - for those that have issues with weapons - that might solve the problem. setPositionOffsets and setRotationOffsets might fix the object not fitting the projection box. http://s8.postimg.org/sbx46ni9x/mta_scr ... _16_24.jpg
-
If the graphics card does not support MRT in shaders then i'd suggest using the nonMRT option. createPreview(...,false) instead of default 'true'. I have released a new version - for those that have issues with weapons - that might solve the problem. setPositionOffsets and setRotationOffsets might fix the object not fitting the projection box.
-
Well ... it works for me. http://s11.postimg.org/3w2quu2ir/mta_sc ... _35_24.jpg The effects for peds are quite simple ( much simpler than of a vehicle) and should work just fine. I guess the default render states might be the problem. I'll try to focus on the bugs i've been informed on.
-
I don't even know which version was that ? Bump mapped roadshine mixed with detail textures ? There is so much unfinished stuff. Kind of good that it was put to any use. Looks like it needs some tweaking, but is already impressive.
-
Thanks for feedback. Indeed i didn't think much about the collisions. Maybe applied multiRes modifier to lower the number of polygons. I don't have much experience in modeling so i just left it as it is.
-
I have released a working version. I'm not fully happy about it. But it is a proof that things can be done: https://community.multitheftauto.com/ind ... s&id=12151