XaskeL

Members
  • Content Count

    189
  • Joined

  • Last visited

  • Days Won

    3

XaskeL last won the day on October 17

XaskeL had the most liked content!

Community Reputation

37 Good

3 Followers

About XaskeL

Details

  • Gang
    Russian Boy!
  • Location
    Taiga
  • Occupation
    Vodka, Bear!
  • Interests
    Balalaika

Recent Profile Visitors

2,188 profile views
  1. Into the SSLR account in Ren712 shaders (just from this Russian article). I myself am interested in the study of shaders, but I do not know much about mathematics. Look on file: image4D_mir.fx https://community.multitheftauto.com/index.php?p=resources&s=details&id=12052
  2. Why then the license for this gamemode appeared much later? https://github.com/NullSystemWorks/mtadayz/commit/2cf21db59c289071a102137975eccda1b1bd0efb
  3. local sX,sY = guiGetScreenSize() local gradientShader = dxCreateShader("files/shader/gradient.fx") local rt1 = dxCreateRenderTarget(sX*0.3, sY*0.05, true) local rt2 = dxCreateRenderTarget(sX*0.3, sY*0.05, true) function drawThings() -- ##RENDER TARGET #1 dxSetRenderTarget(rt1) dxDrawRectangle(0,0,sX*0.3, sY*0.05) -- Box dxDrawImage(0,15,sY*0.02,sY*0.02, imagePath) -- Star? -- dxDrawImage(0,0,sX*0.3, sY*0.05, gradientShader) -- what for? dxSetRenderTarget() -- first shader dxSetShaderValue(gradientShader, "startColor", 207/255, 22/255, 124/255,1) dxSetShaderValue(gradientShader, "endColor", 239/255, 56/255, 48/255,1) dxSetShaderValue(gradientShader, "tex", rt1) dxSetRenderTarget(rt1, true) dxDrawImage(0, 0, sX*0.3, sY*0.05, gradientShader) -- return to render target results from shader dxSetRenderTarget() -- ##RENDER TARGET #2 dxSetRenderTarget(rt2) dxDrawRectangle(0,0,sX*0.3, sY*0.05) -- Box dxDrawImage(0,15,sY*0.02,sY*0.02, imagePath) -- Star -- dxDrawImage(0,0, sX*0.3, sY*0.05, gradientShader) -- are you sure? dxSetRenderTarget() -- second shader dxSetShaderValue(gradientShader, "startColor", 207/255, 22/255, 124/255,1) dxSetShaderValue(gradientShader, "endColor", 239/255, 56/255, 48/255,1) dxSetShaderValue(gradientShader, "tex", rt2) dxSetRenderTarget(rt2, true) dxDrawImage(0, 0, sY*0.02, sY*0.02, gradientShader) -- return to render target results from shader dxSetRenderTarget() addEventHandler("onClientRender",root,renderThings) end function renderThings() dxDrawImage(sX*0.05,sY*0.1,sX*0.3, sY*0.05, rt1) dxDrawImage(sX*0.05,sY*0.4,sX*0.3, sY*0.05, rt2) end drawThings()
  4. Now I'm completely confused about what you want to do
  5. refleTexCoord.y = 1 - refleTexCoord.y; refleTexCoord.y += gCameraDirection.z; ?
  6. You can create several RTs and write the result of the shader into them. And already display RT themselves.
  7. You need output results from shader. local rt = dxCreateRendertTarget(600, 600, true) dxSetRenderTarget(rt) dxDrawImage(0, 0, 600, 600, shader) dxSetRenderTarget() Test it code: local sX,sY = guiGetScreenSize() local gradientShader = dxCreateShader("files/shader/gradient.fx") local rt = dxCreateRenderTarget(sX*0.3, sY*0.05, true) function drawThings() dxSetRenderTarget(rt) dxDrawRectangle(0,0,sX*0.3, sY*0.05) dxSetRenderTarget() --texture = dxCreateTexture(dxGetTexturePixels(rt)) -- useless (RENDERTARGET = TEXTURE!) dxSetShaderValue(gradientShader, "tex", rt) dxSetShaderValue(gradientShader, "startColor", 207/255, 22/255, 124/255,1) dxSetShaderValue(gradientShader, "endColor", 239/255, 56/255, 48/255,1) addEventHandler("onClientRender",root,renderThings) end function renderThings() dxDrawImage(sX*0.05,sY*0.1,sX*0.3, sY*0.05, gradientShader) end drawThings() Or what do you want to do?
  8. float4 color = tex2D(Sampler0,TexCoord); return startColor* (1.0f - TexCoord.x)+endColor * TexCoord.x; ??? float4 color = tex2D(Sampler0,TexCoord); return color*(startColor*(1.0f-TexCoord.x)+endColor*TexCoord.x); // ?
  9. And what exactly is the problem?
  10. If you are not using scene reader in the Render Target from the shader, then in the “dxUpdateScreenSource” there is a resampleNow parameter. Which captures an image from a previous frame or current. P.S. I would like to see the code in the future
  11. XaskeL

    TGA Reader

    No, I just tried to read the whole file, the colors of the pixels (judging by the result.log, it seems to be successful). But I don’t know yet how the pixel positions inside the binary file go. Thanks for the links.
  12. ahah. bs ultimate copy I also want to launch my version of DayZ Gamemode for sharing soon. I will try to implement what I have been thinking about for many years, in terms of optimization, additional cool features.
  13. XaskeL

    TGA Reader

    Does anyone have any idea how to make a pixel definition in a binary file to change it? That is, calculate its position in the file and then change the color using the function. I am writing a mini-game Pixel Battle to put in open access. And, for the script to work better, I will work with the image on the server and client side, transmit data about the changed pixels (which should positively affect the optimization and the network part). I am currently trying to read files without RLE compression from the server side. function CImageTGA:GetPixel(x,y) local Depth = self:GetDepth() local GetImageSize = self:GetImageSize(); local headerSize = self:SkipFirstBlock(); x = x <= GetImageSize.x and x or GetImageSize.x; y = y <= GetImageSize.y and y or GetImageSize.y; -- RGBA (1, 1, 1, 1) self.file:setPos(headerSize); -- COLOR local BytesPerPixel = Depth / 8; local BlockInfo = self.reader:ReadUInt8(); local RLE = bitAnd(BlockInfo, 128); local CountPixels = bitAnd(BlockInfo, 127) -- Read RAW First Byte self.file:setPos(headerSize + 1); -- GET ALL PIXELS. TEST local color = {} local h1, h2, h3 = debug.gethook() debug.sethook() for i = 0, (BytesPerPixel * GetImageSize.x * GetImageSize.y), BytesPerPixel do table.insert( color, self.reader:ReadUInt8() ) self.file:setPos(headerSize + i); end debug.sethook (_, h1, h2, h3) return color; end
  14. it's some kind of madness. I want it in mta
  15. Рисуйте их отдельно от радара (выше чем он сам)