-
Posts
327 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Ren_712
-
[REL] Texture replacement SHADER (car wraps etc)
Ren_712 replied to Dutchman101's topic in Resources
Ok so here is the thing To see the vehicles you need to teleport to (0,0,4) position on the map. You'll see some vehicles created there. When you push f2 you will destroy/create textures and vehicles. -
It is possible, but it requires rendering vehicle and background in a separate rendering pass. The object preview shaders (without the custom position) might be good enough.
-
could you delete my email from your message ? Oh and you apply the effects to world textures ? try to run the shader from community as a separate resource is there any difference ?
-
Little question about tiling a texture with a shader
Ren_712 replied to Einheit-101's topic in Scripting
myRT = Create RT (with alpha channel) Set RT (MyRT) Draw do said RT - image1 (r,g,b,a) Draw do said RT - image2 (r,g,b,a) Draw do said RT - image3 (r,g,b,a) SetRT() dxSetShaderValue (myShader, "sDetailTex", myRT) -
>> The mayor issue with projected paint is the fact, that it draws a texture only to one side (for example car roof) Duh http://www.rastertek.com/dx11tut43.html I'll send Einheit-101 and CodyJ(L) an example. It uses different projection matrix (you will need perspective matrix function from projected_paint)
-
CodyJ(L) The discoball effect is not appropriate here. Look into my projected_paint shader. There are different projection matrices (you'll need view and the perspective matrix) ,Will find explanation and example in said script.
-
Little question about tiling a texture with a shader
Ren_712 replied to Einheit-101's topic in Scripting
How many textures do You need ? Blending them in one layer would be much more efficient. Apply a single renderTarget instead of many textures. -
the gtasa shadows are a whole different thing. What i meant (and what is seen in the first video posted by Grozz) is shadowmapping. You even see 1 frame lag - fixable if you take changes in cameraPosition into the account. So the limit adjuster has nothing to do with it. https://en.wikipedia.org/wiki/Shadow_mapping It is fairly possible to implement that. Even shadow blurring.
-
The issue that will remain is object culling. It might be seen in cam2rt resource (mirror effect) when objects off screen disappear when certain distance is met (sa:render has this issue as well). MTA:Eir was supposed to have custom cameras, this could solve most of the problems.
-
I've made the second resource about 2 years ago. Way before MRT in shaders option was introduced. The whole purpose was to check if things were possible. That one required 1 frame to get scene depth (haven't used a proper orthographic projection matrix yet) and another to draw the outcome. The resolution is low proportionally to screen resolution and shadow range. Right now there are more possibilities. I'll try to release something decent in the near future.
-
You might gut shader_contrast - so the lum RT should be 1x1 white texture. Or something ...
-
Only apply shader ot surfaces that are less then 90 degrees
Ren_712 replied to Captain Cody's topic in Scripting
actually custom objects have this issue with directional lights https://community.multitheftauto.com/index.php?p=resources&s=details&id=10186 Some don't - the ones that have normals set to (0,0,-1) for every vertex have this issue 'fixed' but any shader that uses normal works improperly. -
Only apply shader ot surfaces that are less then 90 degrees
Ren_712 replied to Captain Cody's topic in Scripting
If it works for gtasa map then it should work for other objects as well. Check out shader roadshine1 - if it works properly for those objects. The issue might be that the objects don't have proper normals. Use kams script to export objects from 3ds - some other scripts mess up normals to prevent dynamic vertex lights from blinking - but also prevent mta from generating normals. -
Only apply shader ot surfaces that are less then 90 degrees
Ren_712 replied to Captain Cody's topic in Scripting
world normal.z should be close to 1 - That means that surface normal points up. There is a snow shader that uses that condition: https://community.multitheftauto.com/index.php?p=resources&s=details&id=3419 -
it's a custom vehicle with proper UV's unlike the original one. Have that in mind. You might try this:https://community.multitheftauto.com/index.php?p=resources&s=details&id=12840
-
Grozz- you can create Your own matrices. I've sent You a PM concerning that - also check out my mirror shader - it has the math and solutions You need.
-
focus on technique part. My bet is there is no valid technique, or badly declared.
-
You have to pick the vehicle matrix and get position and the 2 vectors. No need for the rest. That's why you are getting the "with this function already handled" error. Update the values mentioned onClientPreRender event.
-
hulpje - you could easily disable flashing for objects affected by vehicle lights https://community.multitheftauto.com/in ... s&id=10186 It doesn't affect framerate since it's just light states being disabled.
-
You have to update elementPosition, elementFwVector and elementUpVector onClientPreRender. Just like in the original projected_paint script.
-
I have updated the cam2rt resource. A new class cam2RTImage lets you get the render target and draw things as an image. Also remember that the effects have range of 60 units (you might change that - line 12, 13 in the class files). If you change field of view to values above 100 degrees - things start to glitch (especially in vehicles). But for ped - up to 170 degrees seem to look bearable). To get standard (70 degree ) field of view - after setting a ridiculously high value - you can use this simple shader: https://www.dropbox.com/s/ih8hrkdgkcukg ... v.zip?dl=0
-
As long as i can't prevent object culling there is not much that can be done.
-
engineApplyShaderToWorldTexture(shader,"*", targetElement) The targetElement is the object You want to apply the shader to.
-
Do you want that for image or world texture ? This one inverts rgb of an image: http://pastebin.com/raB6Pjae