Jump to content

HELP | Shaders


Tekken

Recommended Posts

Posted (edited)

Hi,

Today I created a shader using engineApplyShaderToWorldTexture.

Sript:

addEventHandler('onClientResourceStart', resourceRoot, 
function() 
    shader = dxCreateShader('shader.fx') 
    terrain = dxCreateTexture('img/1.jpg') 
    dxSetShaderValue(shader, 'gTexture', terrain) 
    engineApplyShaderToWorldTexture(shader, 'des_ripplsand') 
end) 

Shader.fx:

texture gTexture; 
  
technique TexReplace 
{ 
    pass P0 
    { 
        Texture[0] = gTexture; 
    } 
} 

But I have a problem the draw distance is too low as you can see here:

eTX0KF4quKmLDBIEILHTatZetDfUTMamizfqFL37Yew=w1280-h720-no

Do you know how to fix that?

Edited by Guest

Resources I made:

Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!

 

Posted

This?

engineSetModelLODDistance 

Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS.

Developer and owner of

https://projectbea.st - Project Beast
Posted
This?
engineSetModelLODDistance 

Still the same..., maybe i did it wrong.Can you give me an example ?

Resources I made:

Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!

 

Posted

You need to know ID of an object.

engineSetModelLODDistance(YOUR_ID, 300) 

If that function doesn't work, then I'm afraid there's no solution to your problem.

Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS.

Developer and owner of

https://projectbea.st - Project Beast
Posted

With the code provided i'm quite surprised that you have shader max render distance defined. How about setting that yourself:

shader = dxCreateShader('shader.fx',0,0,false,"world") - this changes the distance to infinite.

I make shaders .. mainly. My community resources

I'll do some custom stuff, I'm open for cooperation.

Posted
try engineApplyShaderToWorldTexture(myShader,"*") -- which will apply to all the textures. DakiLLa might have a point on this.

What do you mean by "*" ?

EDIT: Thank you so much :D It worked.

Resources I made:

Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!

 

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...