Jump to content

Hlsl Render multiple Vertexs


ZuluTangoDelta

Recommended Posts

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

Because i need more than 4 multiple vertexpositions of one vertex and 4 vertexfunctions dont look good

(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

Link to comment

Ah ok thanks :D Another Question(i hope i can post that here because it has something to do with this shaderscript). Id tried to make a fake glow Object with morphing the original object. Then set the alpha alittlebit down.Works fine....But the murphed glowobjects are rendered behinde other objects/worldobjects. In the ped shell script they solved that problem by set the alpha of the player to 254. Doesnt work for my morphed objects :S I tried many things but with no result :/ Do you know a solution?

1tkdq7wm92.png

better picture:

http://www.pic-upload.de/view-24749381/mta-screen_2014-09-27_22-24-24.png.html

Link to comment

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 ?

Link to comment

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