Jump to content

Adisexe

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Adisexe

  1. It's working now… It was enough to change: with "texture" on "sPicTexture" (in dxSetShaderValue) and draw the image on the entire screen
  2. Hello, I have problem... I would like to make a 3D perspective… The 3D perspective works, but instead of my picture, a white square appears That's how it looks: And the picture that should load, looks like this: debugscript is clean My code looks like this: local sx, sy = guiGetScreenSize() local zoom = sx < 1920 and math.min(2, 1920/sx) or 1 local register_window = dxCreateTexture("images/register_window.png", "argb", true, "clamp") local ox,oy = 0,0 local mx,my = 5,5 local rt = dxCreateRenderTarget(sx,sy,true) local shader = dxCreateShader("shaders/texture3d.fx") function updateRotation() dxSetRenderTarget(rt, true) dxDrawImage(sx/2 - 396.5/zoom, sy/2 - 200/zoom, 793/zoom, 661/zoom, register_window) dxSetRenderTarget() dxSetShaderValue(shader,"texture",rt) local px,py = getCursorPosition() ox,oy = (px-0.5)*mx,(py-0.5)*my dxSetShaderTransform(shader,ox,oy) dxDrawImage(sx/2 - 396.5/zoom, sy/2 - 200/zoom, 793/zoom, 661/zoom, shader) end addEventHandler("onClientRender", root, updateRotation) Help me please :C
×
×
  • Create New...