Jump to content

85242

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About 85242

  • Rank
    Vic

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. not working, shows only the blur
  2. // // blackwhite.fx // texture screenSource; sampler TextureSampler = sampler_state { Texture = <screenSource>; }; float4 PixelShaderFunction(float2 TextureCoordinate : TEXCOORD0) : COLOR0 { float4 color = tex2D(TextureSampler, TextureCoordinate); float value = (color.r + color.g + color.b) / 11; color.r = value; color.g = value; color.b = value; return color; } technique BlackAndWhite { pass Pass1 { PixelShader = compile ps_2_0 PixelShaderFunction(); } } //blurshader.fx texture ScreenSource; float BlurStrength; float2 UVSize;
  3. local blackWhiteShader = dxCreateShader("fx/blackwhite.fx") local screenX, screenY = guiGetScreenSize() local screenSource = dxCreateScreenSource(screenX, screenY) local blurStrength = 6 local blurShader = dxCreateShader("fx/BlurShader.fx") function doBlackAndWhite() if (blackWhiteShader) then dxUpdateScreenSource(screenSource) dxSetShaderValue(blackWhiteShader, "screenSource", screenSource) dxDrawImage(0, 0, screenX, screenY, blackWhiteShader) end end function blur() if (blurShader) then dxSetShaderValue(blurShader, "ScreenSource", screenS
  4. i want to make fade effect on every image switch like this: https://i.imgur.com/OA08JvD.mp4 Images = { {"image1.png", 255}, {"image2.png", 0}, }; function fadeImages() if (Images[1][2] > 0) then Images[1][2] = Images[1][2]-1; end if (Images[2][2] < 255) then Images[2][2] = Images[2][2]+1; end dxDrawImage(500, 500, 250, 250, Images[1][1], 0, 0, 0, tocolor(255, 255, 255, Images[1][2]), false); dxDrawImage(500, 500, 250, 250, Images[2][1], 0, 0, 0, tocolor(255, 255, 255, Images[2][2]), false); end but it's only work with 2
  5. hello how can i add fading effect on every image switch? local textures = {} for i=1, 4 do textures[i] = dxCreateTexture("img/bg" .. i .. ".png") or "img/bg" .. i .. ".png" -- apply a fallback in case of failing end local backgroundTexture = textures[1] function random() backgroundTexture = textures[math.random(4)] end setTimer( random, 3000, 0 ) local angle = 0 local function draw() dxDrawImage(0, 0, screenSize.x, screenSize.y, backgroundTexture, angle, 0, -120) end
×
×
  • Create New...