Jump to content

Detail Shader and Contrast Shader together ?!


Recommended Posts

Good day Dear Forum,

I was trying to make a little Shader Menu for my server.

Now the menu should give you the option two activate two shaders

Contrast and Detail shader.

Both work fine, but when I activate them at the same time I get errors.

If Detail is activated, contrast wont be able to be activated.

What is the problem ? I think the textures of Detail are making the errors, but what

should i do, that both work at the same time ?

This error repeats till I deactivate Detail Shader:

FHCF652.png

Deactivating Detail, activating Contrast, deactivating and activating Detail again brings this error:

XdwhSjF.png

And here are the script snippets of the errors:

c_contrast.lua:146: 
myScreenSourceFull = dxCreateScreenSource( scx, scy ) 
c_contrast.lua:169 - 173: 
dxDrawImage( 0, 0, scx, scy, current1, 0, 0, 0, tocolor(255,255,255,v.MulBlend*255) ) 
        dxDrawImage( 0, 0, scx, scy, current2, 0, 0, 0, tocolor(255,255,255,v.BloomBlend*255) ) 
        -- Draw border texture 
        dxDrawImage( 0, 0, scx, scy, textureVignette, 0, 0, 0, tocolor(255,255,255,v.Vignette*255) ) 
c_contrast.lua:234: 
dxSetShaderValue( modulationShader, "sExtraFrom", ExtraFrom ) 

I think the problem occurs because contrast needs to read the textures but detail has changed them:

-- Load textures 
    detail22Texture = dxCreateTexture(path..'media/detail22.png', "dxt3") 
    detail58Texture = dxCreateTexture(path..'media/detail58.png', "dxt3") 
    detail68Texture = dxCreateTexture(path..'media/detail68.png', "dxt1") 
    detail63Texture = dxCreateTexture(path..'media/detail63.png', "dxt3") 
    dirtyTexture = dxCreateTexture(path..'media/dirty.png', "dxt3") 
    detail04Texture = dxCreateTexture(path..'media/detail04.png', "dxt3") 
    detail29Texture = dxCreateTexture(path..'media/detail29.png', "dxt3") 
    detail55Texture = dxCreateTexture(path..'media/detail55.png', "dxt3") 
    detail35TTexture = dxCreateTexture(path..'media/detail35T.png', "dxt3") 

Sorry for my bad english.

I'd be so thankfull if someone has the solution!!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...