Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2013-02-17, 19:39


Bilguun







Wiek: 26
Na forum: 5071 dni
Posty: 133
Nick w MP: Bilguun

Piwa: 4

Respekt: 50

Ostrzeżeń: 20%
Witam, mam pytanie. Jak zrobi? taki efekt pod jakimkolwiek GUI ?
Mam potrzebne pliki do tego czyli"

blurV.fx
blurH.fx



Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
kamilowy
Wysłany: 2013-02-17, 19:55


Jacob

Głupiomądry






Wiek: 28
Na forum: 5502 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

Panieee, ja kiedy? te? szuka?em tego. Jak znalaz?em te pliki i kody do tego to a? si? za g?ow? z?apa?em. Jak poszukasz na angielskich forach to co? znajdziesz.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-02-17, 20:03


Bilguun







Wiek: 26
Na forum: 5071 dni
Posty: 133
Nick w MP: Bilguun

Piwa: 4

Respekt: 50

Ostrzeżeń: 20%
A nie masz linka ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-02-17, 20:05


Jacob

Głupiomądry






Wiek: 28
Na forum: 5502 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

Kiedy to by?o... Nie, nie mam.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-02-17, 20:12


Bilguun







Wiek: 26
Na forum: 5071 dni
Posty: 133
Nick w MP: Bilguun

Piwa: 4

Respekt: 50

Ostrzeżeń: 20%
Oto kod kt?ry znalaz?em:
c.lua
Kod:

--
-- c_bloom.lua
--

local scx, scy = guiGetScreenSize()

-----------------------------------------------------------------------------------
-- Le settings
-----------------------------------------------------------------------------------
Settings = {}
Settings.var = {}
Settings.var.bloom = 1.5
Settings.var.blendR = 255
Settings.var.blendG = 255
Settings.var.blendB = 255
Settings.var.blendA = 100



----------------------------------------------------------------
-- onClientResourceStart
----------------------------------------------------------------
addEventHandler( "onClientResourceStart", resourceRoot,
function()

-- Version check
if getVersion ().sortable < "1.1.0" then
outputChatBox( "Resource is not compatible with this client." )
return
end

-- Create things
myScreenSource = dxCreateScreenSource( scx/2, scy/2 )

blurHShader,tecName = dxCreateShader( "blurH.fx" )
outputDebugString( "blurHShader is using technique " .. tostring(tecName) )

--blurVShader,tecName = dxCreateShader( "blurV.fx" )
--outputDebugString( "blurVShader is using technique " .. tostring(tecName) )

-- Check everything is ok
bAllValid = myScreenSource and blurHShader

if not bAllValid then
outputChatBox( "Could not create some things. Please use debugscript 3" )
end
end
)


-----------------------------------------------------------------------------------
-- onClientHUDRender
-----------------------------------------------------------------------------------
addEventHandler( "onClientHUDRender", root,
function()
if not Settings.var then
return
end
if bAllValid then
-- Reset render target pool
RTPool.frameStart()

-- Update screen
dxUpdateScreenSource( myScreenSource )

-- Start with screen
local current = myScreenSource

-- Apply all the effects, bouncing from one render target to another
current = applyGBlurH( current, Settings.var.bloom )
--current = applyGBlurV( current, Settings.var.bloom )

-- When we're done, turn the render target back to default
dxSetRenderTarget()

-- Mix result onto the screen using 'add' rather than 'alpha blend'
if current then
dxSetShaderValue( blurHShader, "TEX0", current )
local col = tocolor(Settings.var.blendR, Settings.var.blendG, Settings.var.blendB, Settings.var.blendA)
dxDrawImage( 0, 0, scx, scy, blurHShader, 0,0,0, col)
end
end
end
)


-----------------------------------------------------------------------------------
-- Apply the different stages
-----------------------------------------------------------------------------------

function applyGBlurH( Src, bloom )
if not Src then return nil end
local mx,my = dxGetMaterialSize( Src )
local newRT = RTPool.GetUnused(mx,my)
if not newRT then return nil end
dxSetRenderTarget( newRT, true )
dxSetShaderValue( blurHShader, "TEX0", Src )
dxSetShaderValue( blurHShader, "TEX0SIZE", mx,my )
dxSetShaderValue( blurHShader, "BLOOM", bloom )
dxDrawImage( 0, 0, mx, my, blurHShader )
return newRT
end


-----------------------------------------------------------------------------------
-- Pool of render targets
-----------------------------------------------------------------------------------
RTPool = {}
RTPool.list = {}

function RTPool.frameStart()
for rt,info in pairs(RTPool.list) do
info.bInUse = false
end
end

function RTPool.GetUnused( mx, my )
-- Find unused existing
for rt,info in pairs(RTPool.list) do
if not info.bInUse and info.mx == mx and info.my == my then
info.bInUse = true
return rt
end
end
-- Add new
local rt = dxCreateRenderTarget( mx, my )
if rt then
outputDebugString( "creating new RT " .. tostring(mx) .. " x " .. tostring(mx) )
RTPool.list[rt] = { bInUse = true, mx = mx, my = my }
end
return rt
end

I nie dzia?a, nawet skryptu nie szuka

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-02-18, 08:01


Oski

LUA Scripter






Wiek: 30
Na forum: 5246 dni
Posty: 428
Nick w MP: Oski

Piwa: 56

Respekt: 75,1

u?ywasz exportowania ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-02-18, 10:30


Daniex0r

Project-Roleplay






Wiek: 31
Na forum: 5202 dni
Posty: 13
Nick w MP: Daniel_Wane

Piwa: 27

Respekt: 50

Ostrzeżeń: 20%
Odnosz? wra?enie, ?e screen z devGaming ,pliki blur te? oraz plik clienta te? :) Ju? tak kiedy? by?o jak "usi?owa?es" robi? skrypt, po 30 minutach siedzenia nad tob? okaza?o si? ?e masz tylko stron? client z deva. Panowie strata czasu, lepiej zamkn??.

Podpis
"Nie zamierzam dyskutować z D ebilami" - Brzydki Burak
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-02-18, 15:14


Bilguun







Wiek: 26
Na forum: 5071 dni
Posty: 133
Nick w MP: Bilguun

Piwa: 4

Respekt: 50

Ostrzeżeń: 20%
Zapewniam ci? ?e to nie s? pliki client od devgaming, le z sam screen. Plik wzi??em z forum MTASA.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-02-18, 17:23


Piorun







Wiek: 32
Na forum: 6712 dni
Posty: 1837
Nick w MP: Piorun

Piwa: 516

Respekt: 480,7
Respekt: 480,7

Po kij wam plik .lua skoro nie macie plik?w z shaderami, mety i ew. dodatkowych plik?w?

Podpis
Możesz mnie znaleźć na: Facebook
Postaw piwo autorowi tego posta
 

 
Tagi: blur :: pod :: gui
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Blur pod GUI Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku