Jump to content

ZuluTangoDelta

Members
  • Posts

    16
  • Joined

  • Last visited

Everything posted by ZuluTangoDelta

  1. Hi i read this ( https://bugs.mtasa.com/view.php?id=8769 ) and try the script but i doesnt work Is it only possible in Mta 1.5 because i only find MRTs in a Mta 1.5 changelog.
  2. I render a Shader on a 3D material and I use 5 passes and blend them with DestBlend. But the the Fog disapear on the 3d material. There is no other way yet so i need to use DestBlend. Here some Pictures: Without Destblend: http://www.pic-upload.de/view-25263558/ ... 2.png.html With Destblend: http://www.pic-upload.de/view-25263556/ ... t.png.html Solve it by added Fogeffect inside the Surfaceshader.
  3. So much thanks Ren_712 It works by setting the enginereplacemodel boolean "alphaTransparency " to true for the wanted glowobject. Layered Shaders are tricky
  4. Ah ok thanks 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 I tried many things but with no result Do you know a solution? better picture: http://www.pic-upload.de/view-24749381/mta-screen_2014-09-27_22-24-24.png.html
  5. Hi i want to render multiple times the same Vertexes. Its possible with multiple vertexshaderfunction in the shader. But is there anothere way?Because i need more than 4 multiple vertexpositions of one vertex and 4 vertexfunctions dont look good
  6. Hi i have little big problem I want to apply a bloom shader only on one texture. My idea was to render a screentexture on which only the wanted texture appears on(other textures are black). Then i blend it with the original screensource.But I dont get it :/How can I render a scene from the game with only one texture(other textures must be black). I tried it but i can only render one scene on one frame. I mean i can only render the original scene or the wanted bloomtexture.The only option which i see is to render each one for one frame.But then i have only the half framerate
  7. Ok thanks.i had this idea too.I work with a kind of "chunks" like minecraft^^ because the map will be very very big(Objects >100.000) But i got problems with reading more than 500 files.(i want to create for each chunk a file [1600 chunks] ) Is there any other methode to store many objects?I work with tables and i dont know what the limit of tables are Probably i need to create more than one table to store the informations.
  8. Hello i try to store objects.The objectsinfos(position,model,rotation) are stored in a table.When i want to safe the table informations i create a txt file(looks like this["Chunk:44; model:3345; x:-3300.7; y:-3700.3; z:40; rx:0; ry:0; rz:0|"].If there are 30000 objects a error appears (not enough memory).How can i solve this?
  9. Hi i am trying to create a painttool for terrains.I try it with blendmaps so if there is a green pixel on the blendmap then texture A apears on the terrain,if there is a orange pixels on the blendmap texture b apears on the terrain....The problem are the edges of the textures.So with this methode it only works with three textures (R,G,B) and if i want mor textures it doesnt work My source: http://www.google.de/imgres?imgurl=http%3A%2F%2Fallenwp.com%2Fblog%2Fwp-content%2Fuploads%2F2010%2F05%2FToyFactory_Multi-texturing_organic.jpg&imgrefurl=http%3A%2F%2Fallenwp.com%2Fblog%2F2010%2F05%2F06%2Fsimple-fast-gpu-driven-multi-textured-terrain%2F&h=576&w=768&tbnid=kktZp3kbZQjW_M%3A&zoom=1&docid=ETKkK_XkHVJcrM&ei=dPFOU9qfIsb-ygOw2ILgAQ&tbm=isch&iact=rc&uact=3&dur=221&page=1&start=0&ndsp=10&ved=0CFgQrQMwAA
  10. Hi i want to save pixelvalues serverside so everybody has every time the same textures (i need this for my terrain shader. The terrain shader works with a kind of blendtexture so white will replace for sand,red for gras ....).But can i save so much informations serverside? 500x500 texture for each object(6400 objects).I dont know the table limit.So my idea was to save it in a string format. Is my idea possible or is there a better idea?
  11. Ok thanks the only problem is to change the alpha of the outer pixels of the circel so i can use lerp(sand,gras,saturate(1-blendcolor.a)); in the shader so the sandtexture has smoother edges.Have you a solution for that?
  12. So you mean i should use rendertarget and draw a circel on it and give it to the shader?im not a pro in shaders so i dont know which solution is the best.But i need to draw a filled circel.I solve it without sin and cos and use pythagoras. function draw (radius,x,y,r,g,b) --x,y the position of the player so the sandtex is drawn under the player local ox,oy,oz = getElementPosition(obj1) --obj1 is the testterrain on which the shader draws the sandtexture nx = (ox+x)*5+250-radius/2 ny = (oy-y)*5+250-radius/2 local pixels = dxGetTexturePixels (mapdraw) --mapdraw is the empty texture on which i draw the different colors so the shader can replace the colors for different textures for i=0,radius*2,1 do local x = -radius+i local y = math.sqrt(((radius*radius)-(x*x))) for ly=0,y*2,1 do dxSetPixelColor (pixels,nx+x, ny+y-ly, r,g,b, 255) end end dxSetTexturePixels (mapdraw, pixels) end this texture is given to the sahder which replace the white circel with a new sandtexture on a terrain.I hope you understood me
  13. Hi i try to draw a circel with dxSetPixelColor for a texture so i can use it for a terrain shader.A recental works fine but when i try to change the colors of pixels in a circel radius >5 it lags ver much i select the pixels with math.cos and math. sin.
  14. Hi i want to paint a texture on an other texture.So the texture apears on the other texture in the circel.When i change the position of the circel the texture goes away from the old position.I want that the painting texture keeps on its position and overlay the new position too(like painting).I dont know how to solve this problem(i started with shaders few days ago so i am not a pro) Any Tutorials or ideas? sampler firstSampler; texture texture1; // drawmaterial float x; float y; float radius; sampler Sampler2 = sampler_state { texture = <texture1>; }; float4 PSFade(float2 Tex : TEXCOORD0) : COLOR { if ( ((Tex.x-x)*(Tex.x-x)+(Tex.y-y)*(Tex.y-y)) < radius ) // Only in circel { float4 color = tex2D(Sampler2, Tex); color.rgb = color.rgb*0.5; return color; } else { float4 color = tex2D(firstSampler, Tex); color.rgb = color.rgb*0.5; return color; } } technique main { pass p1 { PixelShader = compile ps_2_0 PSFade(); } }
  15. I want to check whether a object is inside another object.
  16. Hello.I try to check whether a colshape is in a colshape.I guess it does not work with isElementWithinColShape but why?I thought a Colshape is also a element. So this is my try: function getColshapesElementisin(element) Colshapetable = {} if element or isElement(element)then for i,colshape in ipairs(getElementsByType("colshape"))do if isElementWithinColShape(element,colshape) then table.insert (Colshapetable, table.getn (Colshapetable)+1,colshape) end end end return Colshapetable end Btw You must know that the element must be a Colshape, because i want to use the function to check whether a Colshape is inside another Colshape. Element = Colshape
×
×
  • Create New...