Jump to content

Skins se deforman con el shader


Recommended Posts

Hay algunos shaders que son los de el agua que afectan mucho a la forma del ped eso también incluye el de la reflexión de los autos.

tambien en los que remplazan texturas? como lo es este shader?

No debería.. Podrías postear el shader aquí? (.fx)

Link to comment
Podrías postearlos por favor..

DETAIL.FX

// 
// Example shader - detail.fx 
// 
  
  
//--------------------------------------------------------------------- 
// Detail settings 
//--------------------------------------------------------------------- 
texture sDetailTexture; 
float sDetailScale = 8;         // Repeat interval of the texture 
float sFadeStart = 10;          // Near point where distance fading will start 
float sFadeEnd = 80;            // Far point where distance fading will complete (i.e. effect will not be visible past this point) 
float sStrength = 0.5;          // 0 to 1 for the strength of the effect 
float sAnisotropy = 0.0;        // 0 to 1 for the amount anisotropy of the effect - Higher looks better but can be slower 
  
  
//--------------------------------------------------------------------- 
// Include some common stuff 
//--------------------------------------------------------------------- 
#include "mta-helper.fx" 
  
  
//--------------------------------------------------------------------- 
// Extra renderstates which we use 
//--------------------------------------------------------------------- 
int gCapsMaxAnisotropy                      < string deviceCaps="MaxAnisotropy"; >;  
  
  
//--------------------------------------------------------------------- 
// Sampler for the main texture 
//--------------------------------------------------------------------- 
sampler Sampler0 = sampler_state 
{ 
    Texture = (gTexture0); 
    MipFilter = Linear; 
    MaxAnisotropy = gCapsMaxAnisotropy * sAnisotropy; 
    MinFilter = Anisotropic; 
}; 
  
//--------------------------------------------------------------------- 
// Sampler for the detail texture 
//--------------------------------------------------------------------- 
sampler SamplerDetail = sampler_state 
{ 
    Texture = (sDetailTexture); 
    MipFilter = Linear; 
    MaxAnisotropy = gCapsMaxAnisotropy * sAnisotropy; 
    MinFilter = Anisotropic; 
}; 
  
  
//--------------------------------------------------------------------- 
// Structure of data sent to the vertex shader 
//--------------------------------------------------------------------- 
struct VertexShaderInput 
{ 
  float3 Position : POSITION0; 
  float3 Normal : NORMAL0; 
  float4 Diffuse : COLOR0; 
  float2 TexCoord : TEXCOORD0; 
}; 
  
//--------------------------------------------------------------------- 
// Structure of data sent to the pixel shader ( from the vertex shader ) 
//--------------------------------------------------------------------- 
struct PixelShaderInput 
{ 
  float4 Position : POSITION0; 
  float4 Diffuse : COLOR0; 
  float2 TexCoord : TEXCOORD0; 
  float2 DistFade : TEXCOORD1; 
}; 
  
  
//------------------------------------------------------------------------------------------ 
// VertexShaderFunction 
//  1. Read from VS structure 
//  2. Process 
//  3. Write to PS structure 
//------------------------------------------------------------------------------------------ 
PixelShaderInput VertexShaderFunction(VertexShaderInput VS) 
{ 
    // Initialize result 
    PixelShaderInput PS = (PixelShaderInput)0; 
  
    // Calculate screen pos of vertex 
    PS.Position = MTACalcScreenPosition( VS.Position ); 
  
    // Pass through tex coord 
    PS.TexCoord = VS.TexCoord; 
  
    // Calculate GTA lighting for buildings 
    PS.Diffuse = MTACalcGTABuildingDiffuse( VS.Diffuse ); 
  
    // Distance fade calculation 
    float DistanceFromCamera = MTACalcCameraDistance( gCameraPosition, MTACalcWorldPosition( VS.Position ) ); 
    PS.DistFade.x = 1 - ( ( DistanceFromCamera - sFadeStart ) / ( sFadeEnd - sFadeStart ) ); 
  
    // Return result 
    return PS; 
} 
  
//------------------------------------------------------------------------------------------ 
// PixelShaderFunction 
//  1. Read from PS structure 
//  2. Process 
//  3. Return pixel color 
//------------------------------------------------------------------------------------------ 
float4 PixelShaderFunction(PixelShaderInput PS) : COLOR0 
{ 
    // Get texture pixel 
    float4 texel = tex2D(Sampler0, PS.TexCoord); 
  
    // Get detail pixel 
    float4 texelDetail1 = tex2D(SamplerDetail, PS.TexCoord * sDetailScale ); 
    float4 texelDetail2 = tex2D(SamplerDetail, PS.TexCoord * sDetailScale * 1.9 ); 
    float4 texelDetail3 = tex2D(SamplerDetail, PS.TexCoord * sDetailScale * 3.6 ); 
    float4 texelDetail4 = tex2D(SamplerDetail, PS.TexCoord * sDetailScale * 7.4 ); 
  
    float4 texelDetail = texelDetail1 * texelDetail2 * 2 * texelDetail3 * 2 * texelDetail4 * 2; 
  
    // Apply diffuse lighting 
    float4 Color = texel * PS.Diffuse; 
  
    // Attenuate detail depending on pixel distance and user setting 
    float detailAmount = saturate( PS.DistFade.x ) * sStrength; 
    float4 texelDetailToUse = lerp ( 0.5, texelDetail, detailAmount ); 
  
    // Add detail 
    float4 finalColor = Color * texelDetailToUse * 2; 
    finalColor.a = Color.a; 
  
    // Return result 
    return finalColor; 
} 
  
  
//------------------------------------------------------------------------------------------ 
// Techniques 
//------------------------------------------------------------------------------------------ 
  
technique detail 
{ 
    pass P0 
    { 
        VertexShader = compile vs_2_0 VertexShaderFunction(); 
        PixelShader = compile ps_2_0 PixelShaderFunction(); 
    } 
} 
  
technique fallback 
{ 
    pass P0 
    { 
        // Just draw normally 
    } 
} 
  

MTA-HELPER

// 
// mta-helper.fx
//
// File version: 0.0.1
// Date updated: 2011-09-12
//
// Big file of doom containg most of the stuff you need to get shaders working with MTA
//
 
 
//
// This file has 4 sections:
//      1. Variables
//      2. Renders states (parital - includes only those that are used the most)
//      3. Helper functions
//      4. Generate normals macros
//
 
 
 
//####################################################################################################################
//####################################################################################################################
//
// Section #1 : Variables
//
//####################################################################################################################
//####################################################################################################################
 
//---------------------------------------------------------------------
// These parameters are set by MTA whenever a shader is drawn
//---------------------------------------------------------------------
 
//
// Matrices
//
float4x4 gWorld : WORLD;
float4x4 gView : VIEW;
float4x4 gProjection : PROJECTION;
float4x4 gWorldView : WORLDVIEW;
float4x4 gWorldViewProjection : WORLDVIEWPROJECTION;
float4x4 gViewProjection : VIEWPROJECTION;
float4x4 gViewInverse : VIEWINVERSE;
float4x4 gWorldInverseTranspose : WORLDINVERSETRANSPOSE;
float4x4 gViewInverseTranspose : VIEWINVERSETRANSPOSE;
 
//
// Camera
//
float3 gCameraPosition : CAMERAPOSITION;
float3 gCameraDirection : CAMERADIRECTION;
 
//
// Seconds counter
//
float gTime : TIME;
 
//
// Strongest light influence
//
float4 gLightAmbient : LIGHTAMBIENT;
float4 gLightDiffuse : LIGHTDIFFUSE;
float4 gLightSpecular : LIGHTSPECULAR;
float3 gLightDirection : LIGHTDIRECTION;
 
 
 
//####################################################################################################################
//####################################################################################################################
//
// Section #2 : Renders states
//
//####################################################################################################################
//####################################################################################################################
 
//---------------------------------------------------------------------
// The parameters below mirror the contents of the D3D registers.
// They are only relevant when using engineApplyShaderToWorldTexture.
//---------------------------------------------------------------------
 
//------------------------------------------------------------------------------------------
// renderState (partial) - String value should be one of D3DRENDERSTATETYPE without the D3DRS_  http://msdn.microsoft.com/en-us/library/bb172599%28v=vs.85%29.aspx
//------------------------------------------------------------------------------------------
 
int gLighting                      < string renderState="LIGHTING"; >;                        //  = 137,
 
float4 gGlobalAmbient              < string renderState="AMBIENT"; >;                    //  = 139,
 
int gDiffuseMaterialSource         < string renderState="DIFFUSEMATERIALSOURCE"; >;           //  = 145,
int gSpecularMaterialSource        < string renderState="SPECULARMATERIALSOURCE"; >;          //  = 146,
int gAmbientMaterialSource         < string renderState="AMBIENTMATERIALSOURCE"; >;           //  = 147,
int gEmissiveMaterialSource        < string renderState="EMISSIVEMATERIALSOURCE"; >;          //  = 148,
 
 
//------------------------------------------------------------------------------------------
// materialState - String value should be one of the members from D3DMATERIAL9  http://msdn.microsoft.com/en-us/library/bb172571%28v=VS.85%29.aspx
//------------------------------------------------------------------------------------------
 
float4 gMaterialAmbient     < string materialState="Ambient"; >;
float4 gMaterialDiffuse     < string materialState="Diffuse"; >;
float4 gMaterialSpecular    < string materialState="Specular"; >;
float4 gMaterialEmissive    < string materialState="Emissive"; >;
float gMaterialSpecPower    < string materialState="Power"; >;
 
 
//------------------------------------------------------------------------------------------
// textureState (partial) - String value should be a texture number followed by 'Texture'
//------------------------------------------------------------------------------------------
 
texture gTexture0           < string textureState="0,Texture"; >;
texture gTexture1           < string textureState="1,Texture"; >;
texture gTexture2           < string textureState="2,Texture"; >;
texture gTexture3           < string textureState="3,Texture"; >;
 
 
//------------------------------------------------------------------------------------------
// vertexDeclState  (partial)
//------------------------------------------------------------------------------------------
 
int gDeclNormal             < string vertexDeclState="Normal"; >;       // Set to 1 if vertex stream includes normals
 
 
 
//####################################################################################################################
//####################################################################################################################
//
// Section #3 : Helper functions
//
//####################################################################################################################
//####################################################################################################################
 
//------------------------------------------------------------------------------------------
// MTAUnlerp
// - Find a the relative position between 2 values
//------------------------------------------------------------------------------------------
float MTAUnlerp( float from, float to, float pos )
{
    if ( from == to )
        return 1.0;
    else
        return ( pos - from ) / ( to - from );
}
 
 
//------------------------------------------------------------------------------------------
// MTACalcScreenPosition
// - Transform vertex position for the camera
//------------------------------------------------------------------------------------------
float4 MTACalcScreenPosition( float3 InPosition )
{
    float4 posWorld = mul(float4(InPosition,1), gWorld);
    float4 posWorldView = mul(posWorld, gView);
    return mul(posWorldView, gProjection);
}
 
//------------------------------------------------------------------------------------------
// MTACalcWorldPosition
// - Transform position by current world matix
//------------------------------------------------------------------------------------------
float3 MTACalcWorldPosition( float3 InPosition )
{
    return mul(float4(InPosition,1), gWorld).xyz;
}
 
//------------------------------------------------------------------------------------------
// MTACalcWorldNormal
// - Rotate normal by current world matix
//------------------------------------------------------------------------------------------
float3 MTACalcWorldNormal( float3 InNormal )
{
    return mul(InNormal, (float3x3)gWorld);
}
 
//------------------------------------------------------------------------------------------
// MTACalcGTABuildingDiffuse
// - Calculate GTA lighting for buildings
//------------------------------------------------------------------------------------------
float4 MTACalcGTABuildingDiffuse( float4 InDiffuse )
{
    float4 OutDiffuse;
 
    if ( !gLighting )
    {
        // If lighting render state is off, pass through the vertex color
        OutDiffuse = InDiffuse;
    }
    else
    {
        // If lighting render state is on, calculate diffuse color by doing what D3D usually does
        float4 ambient  = gAmbientMaterialSource  == 0 ? gMaterialAmbient  : InDiffuse;
        float4 diffuse  = gDiffuseMaterialSource  == 0 ? gMaterialDiffuse  : InDiffuse;
        float4 emissive = gEmissiveMaterialSource == 0 ? gMaterialEmissive : InDiffuse;
        OutDiffuse = gGlobalAmbient * saturate( ambient + emissive );
        OutDiffuse.a *= diffuse.a;
    }
    return OutDiffuse;
}
 
//------------------------------------------------------------------------------------------
// MTACalcGTAVehicleDiffuse
// - Calculate GTA lighting for vehicles
//------------------------------------------------------------------------------------------
float4 MTACalcGTAVehicleDiffuse( float3 WorldNormal, float4 InDiffuse )
{
    // Calculate diffuse color by doing what D3D usually does
    float4 ambient  = gAmbientMaterialSource  == 0 ? gMaterialAmbient  : InDiffuse;
    float4 diffuse  = gDiffuseMaterialSource  == 0 ? gMaterialDiffuse  : InDiffuse;
    float4 emissive = gEmissiveMaterialSource == 0 ? gMaterialEmissive : InDiffuse;
 
    float4 TotalAmbient = ambient * ( gGlobalAmbient + gLightAmbient );
 
    // Add the strongest light
    float DirectionFactor = max(0,dot(WorldNormal, -gLightDirection ));
    float4 TotalDiffuse = ( diffuse * gLightDiffuse * DirectionFactor );
 
    float4 OutDiffuse = saturate(TotalDiffuse + TotalAmbient + emissive);
    OutDiffuse.a *= diffuse.a;
 
    return OutDiffuse;
}
 
//------------------------------------------------------------------------------------------
// MTACalculateCameraDirection
// - Get camera direction to a world point
//------------------------------------------------------------------------------------------
float3 MTACalculateCameraDirection( float3 CamPos, float3 InWorldPos )
{
    return normalize( InWorldPos - CamPos );
}
 
//------------------------------------------------------------------------------------------
// CalcCameraDistance
// - Get camera distance from a world point
//------------------------------------------------------------------------------------------
float MTACalcCameraDistance( float3 CamPos, float3 InWorldPos )
{
    return distance( InWorldPos, CamPos );
}
 
//------------------------------------------------------------------------------------------
// CalculateSpecular
// - Get specular intensity
//------------------------------------------------------------------------------------------
float MTACalculateSpecular( float3 CamDir, float3 LightDir, float3 SurfNormal, float SpecPower )
{
    // Using Blinn half angle modification for performance over correctness
    LightDir = normalize(LightDir);
    SurfNormal = normalize(SurfNormal);
    float3 halfAngle = normalize(-CamDir - LightDir);
    float r = dot(halfAngle, SurfNormal);
    return pow(saturate(r), SpecPower);
}
 
Link to comment
-- 
-- c_detail.lua
--
 
addEventHandler( "onClientResourceStart", resourceRoot,
    function()
        triggerEvent( "onClientSwitchDetail", resourceRoot, true )
    end
)
 
function handleOnClientSwitchDetail( bOn )
    outputDebugString( "switchDetail: " .. tostring(bOn) )
    if bOn then
        enableDetail()
    else
        disableDetail()
    end
end
 
addEvent( "onClientSwitchDetail", true )
addEventHandler( "onClientSwitchDetail", resourceRoot, handleOnClientSwitchDetail )
 
----------------------------------------------------------------
-- enableDetail
----------------------------------------------------------------
function enableDetail()
    if bEffectEnabled then return end
 
    -- Load textures
    --detail22Texture = dxCreateTexture('shaders/media/detail22.png', "dxt3")
    --detail58Texture = dxCreateTexture('shaders/media/detail58.png', "dxt3")
    --detail68Texture = dxCreateTexture('shaders/media/detail68.png', "dxt1")
    --detail63Texture = dxCreateTexture('shaders/media/detail63.png', "dxt3")
    --dirtyTexture = dxCreateTexture('shaders/media/dirty.png', "dxt3")
    --detail04Texture = dxCreateTexture('shaders/media/detail04.png', "dxt3")
    --detail29Texture = dxCreateTexture('shaders/media/detail29.png', "dxt3")
    --detail55Texture = dxCreateTexture('shaders/media/detail55.png', "dxt3")
    --detail35TTexture = dxCreateTexture('shaders/media/detail35T.png', "dxt3")
 
 
    cloudTexture = dxCreateTexture('shaders/media/35.png', "dxt3")
    waterTexture = dxCreateTexture('shaders/media/73.png', "dxt3")
 
    sandGrass = dxCreateTexture('shaders/media/62.png', "dxt3")
    sandGrass2 = dxCreateTexture('shaders/media/72.png', "dxt3")
 
    grassTexture = dxCreateTexture('shaders/media/1.png', "dxt3")
    grass1to2Texture = dxCreateTexture('shaders/media/67.png', "dxt3") 
   
 
    grgrass = dxCreateTexture('shaders/media/46.png', "dxt3")
    grgrass2grass = dxCreateTexture('shaders/media/57.png', "dxt3")
    grgrass2Rock = dxCreateTexture('shaders/media/47.png', "dxt3")
    grgrass2RockU = dxCreateTexture('shaders/media/30.png', "dxt3")
    grgrass2Road = dxCreateTexture('shaders/media/48.png', "dxt3")
    grgrass2MediumGrass = dxCreateTexture('shaders/media/69.png', "dxt3")
    rock2Road = dxCreateTexture('shaders/media/22.png', "dxt3")
 
    mediumGrass = dxCreateTexture('shaders/media/49.png', "dxt3")
    mediumGrass2Grass = dxCreateTexture('shaders/media/56.png', "dxt3")
    mediumGrass2GrassU = dxCreateTexture('shaders/media/66.png', "dxt3")
    mediumGrass2GrassD = dxCreateTexture('shaders/media/67.png', "dxt3")
 
    dirtRoadTexture = dxCreateTexture('shaders/media/2.png', "dxt3")
    dirtRoadRTexture = dxCreateTexture('shaders/media/18.png', "dxt3")
    dirtRoadLTexture = dxCreateTexture('shaders/media/6.png', "dxt3")
    dirtRoadXTexture = dxCreateTexture('shaders/media/19.png', "dxt3")
    dirtRoadUTexture = dxCreateTexture('shaders/media/32.png', "dxt3")
    dirtRoadEndTexture = dxCreateTexture('shaders/media/33.png', "dxt3")
 
    roadEdge = dxCreateTexture('shaders/media/26.png', "dxt3")
 
    rockUTexture = dxCreateTexture('shaders/media/3.png', "dxt3")
    rockMTexture = dxCreateTexture('shaders/media/7.png', "dxt3")
    rockDTexture = dxCreateTexture('shaders/media/4.png', "dxt3")
 
    dirtTexture = dxCreateTexture('shaders/media/12.png', "dxt3")
    dirt2GrassTexture = dxCreateTexture('shaders/media/52.png', "dxt3")
    dirt2GrassTextureU = dxCreateTexture('shaders/media/65.png', "dxt3")
 
    rockHole = dxCreateTexture('shaders/media/27.png', "dxt3") 
 
    bigRock = dxCreateTexture('shaders/media/29.png', "dxt3")   
    bigRockToRock = dxCreateTexture('shaders/media/44.png', "dxt3") 
    grassToRock = dxCreateTexture('shaders/media/51.png', "dxt3")
    grassToRockR = dxCreateTexture('shaders/media/43.png', "dxt3")
 
    mediumRock = dxCreateTexture('shaders/media/45.png', "dxt3")
    mediumRock2Grass = dxCreateTexture('shaders/media/25.png', "dxt3")
 
    --vegRockBot = dxCreateTexture('shaders/media/17.png', "dxt3")
    lsCliff2 = dxCreateTexture('shaders/media/24.png', "dxt3")
 
 
    palm_bark = dxCreateTexture('shaders/media/40.png', "dxt3")
    palm_leaf = dxCreateTexture('shaders/media/39.png', "dxt3")
 
    grassDeadTexture = dxCreateTexture('shaders/media/9.png', "dxt3")
    grassToDeadTexture = dxCreateTexture('shaders/media/8.png', "dxt3")
    grassToDeadTextureU = dxCreateTexture('shaders/media/8f.png', "dxt3")
    deadGrassRoad = dxCreateTexture('shaders/media/55.png', "dxt3")
    deadFieldTexture = dxCreateTexture('shaders/media/53.png', "dxt3")
    deadFieldTextureToDeadGrass = dxCreateTexture('shaders/media/54.png', "dxt3")
 
    oldAeroTexture = dxCreateTexture('shaders/media/4.png', "dxt3")
 
    gravelToRoadM = dxCreateTexture('shaders/media/22.png', "dxt3")
    gravelToRoadL = dxCreateTexture('shaders/media/23.png', "dxt3")
    gravel = dxCreateTexture('shaders/media/20.png', "dxt3")
    gravelToRoadU = dxCreateTexture('shaders/media/21.png', "dxt3")
    gravelToRoadD = dxCreateTexture('shaders/media/79.png', "dxt3")
 
    vegRockBot = dxCreateTexture('shaders/media/30.png', "dxt3")
    vegRockMid = dxCreateTexture('shaders/media/29.png', "dxt3")
    vegRockLeft = dxCreateTexture('shaders/media/31.png', "dxt3")
    vegRockCorn = dxCreateTexture('shaders/media/80.png', "dxt3")
                con = dxCreateTexture('shaders/media/83.png', "dxt3")
                co2 = dxCreateTexture('shaders/media/84.png', "dxt3")
    --vegRockNoCorn = dxCreateTexture('shaders/media/81.png', "dxt3")
 
    wallTexture = dxCreateTexture('shaders/media/36.png', "dxt3")
 
    roadLineU = dxCreateTexture('shaders/media/5.png', "dxt3")
    roadRTexture = dxCreateTexture('shaders/media/13.png', "dxt3")
 
    grassRoadTexture = dxCreateTexture('shaders/media/55.png', "dxt3")
 
    bush0 = dxCreateTexture('shaders/media/41.png', "dxt3")
    bush1 = dxCreateTexture('shaders/media/10.png', "dxt3")
    bush2 = dxCreateTexture('shaders/media/42.png', "dxt3")
 
    train = dxCreateTexture('shaders/media/14.png', "dxt3")
    trainGravel = dxCreateTexture('shaders/media/15.png', "dxt3")
    dirtGravel = dxCreateTexture('shaders/media/16.png', "dxt3")
 
    blockTexture = dxCreateTexture('shaders/media/78.png', "dxt3")
    greyTexture = dxCreateTexture('shaders/media/38.png', "dxt3")
--[[
    red = dxCreateTexture('shaders/media/red.png', "dxt3")
    blue = dxCreateTexture('shaders/media/blue.png', "dxt3")
    green = dxCreateTexture('shaders/media/green.png', "dxt3")
    yellow = dxCreateTexture('shaders/media/yellow.png', "dxt3")]]
    --alpha = dxCreateTexture('shaders/media/alpha.png', "dxt3")
 
 
    testRock = dxCreateTexture('shaders/media/60.png', "dxt3")
 
    cement = dxCreateTexture('shaders/media/58.png', "dxt3")
 
    -- Create shaders
    brickWallShader, tec = getBrickWallShader()
    if brickWallShader then
        -- Only create the rest if the first one is OK
        grassShader = getGrassShader()
        roadShader = getRoadShader()
        road2Shader = getRoad2Shader()
        paveDirtyShader = getPaveDirtyShader()
        paveStretchShader = getPaveStretchShader()
        barkShader = getBarkShader()
        rockShader = getRockShader()
        mudShader = getMudShader()
        concreteShader = getBrickWallShader()   -- TODO make this better
        sandShader = getMudShader()             -- TODO make this better
 
    end
 
    -- Get list of all elements used
    effectParts = {
                        detail22Texture, detail58Texture, detail68Texture, detail63Texture, dirtyTexture,
                        detail04Texture, detail29Texture, detail55Texture, detail35TTexture,
                        brickWallShader, grassShader, roadShader, road2Shader, paveDirtyShader,
                        paveStretchShader, barkShader, rockShader, mudShader,
                        concreteShader, sandShader
                    }
 
    -- Check list of all elements used
    bAllValid = true
    for _,part in ipairs(effectParts) do
        bAllValid = part and bAllValid
    end
 
    bEffectEnabled = true
 
    if not bAllValid then
        disableDetail()
    else   
        --engineApplyShaderToWorldTexture ( roadShader, "*dirtyroad*" )
        --engineApplyShaderToWorldTexture ( roadShader, "*vegasroad*" )
        --engineApplyShaderToWorldTexture ( roadShader, "*roadirt*" )
        --engineApplyShaderToWorldTexture ( roadShader, "*tar*" )
        --engineApplyShaderToWorldTexture ( paveDirtyShader, "*dirtypave*" )
        --engineApplyShaderToWorldTexture ( concreteShader, "*conc*" )
        --engineApplyShaderToWorldTexture ( road2Shader, "*hiway*" )
        --engineApplyShaderToWorldTexture ( roadShader, "*junction*" )
        --engineApplyShaderToWorldTexture ( paveStretchShader, "snpedtest*" )
 
 
        engineApplyShaderToWorldTexture ( roadShader, "*asphalt*" )
        engineApplyShaderToWorldTexture ( concreteShader, "*wall*" )
        engineApplyShaderToWorldTexture ( concreteShader, "*bridge*" )
        engineApplyShaderToWorldTexture ( concreteShader, "*drain*" )
        engineApplyShaderToWorldTexture ( paveDirtyShader, "*cross*" )
        engineApplyShaderToWorldTexture ( barkShader, "*leave*" )
        engineApplyShaderToWorldTexture ( barkShader, "*log*" )
        engineApplyShaderToWorldTexture ( barkShader, "*d_bark*" )
        engineApplyShaderToWorldTexture ( roadShader, "*carpark*" )    
        engineApplyShaderToWorldTexture ( paveStretchShader, "sidelatino*" )
        engineApplyShaderToWorldTexture ( paveStretchShader, "sjmhoodlawn41" )
 
 
        local keyToTexture = {
            ["cloud*"]              = cloudTexture,
 
            ["*_dirt1*"]            = grassTexture,
            ["*scrub1*"]            = grassTexture,
            ["*oldrun*"]            = grassTexture,
            ["*panelconc*"]         = grassTexture,
            ["*ripplsand*"]         = grassTexture,
            ["*dirtgrassmix*"]      = grassTexture,
            ["grassdeadbrn256"]     = grassTexture,
            ["*grasstype5*"]        = grassTexture,
            ["*heavygrass*"]        = grassTexture,
            ["*grassbrn"]           = grassTexture,
            ["*grassbrn_lod"]       = grassTexture,
            ["*grass2scrub*"]       = grassTexture,
            ["*grass2dirt*"]        = grassTexture,
                   
            ["*desgrasand*"]        = grassTexture,        
            ["*grass_gen*"]         = grassTexture,
            ["*grass_lod*"]         = grassTexture,
            ["*dirt64b2*"]          = grassTexture,
            ["Grass"]               = grassTexture,
            ["Grass_128*"]          = grassTexture,
            ["Grass_lod"]           = grassTexture,
            ["*sandgrnd*"]          = grassTexture,
            ["*grass_dry*"]         = grassTexture,
            ["*yardgras*"]          = grassTexture,
            ["*vegasgolflod*"]      = grassTexture,
            ["newcrop3"]            = grassTexture,
            ["desgreengrassmix"]    = grassTexture,
           
           
            ["*con2sand*"]          = grassTexture,
            ["*grassdry*"]          = grassTexture,
            ["*vgn_ground*"]        = grassTexture,
            ["*drvin_ground*"]      = grassTexture,
            ["*grasslod*"]          = grassTexture,
            ["*brngrass*"]          = grassTexture,
            ["*desgrassbrnLOD*"]        = grassTexture,
            ["*vgsEcoast*"]             = grassTexture,
            ["*vgwestbildlod*"]         = grassTexture,
           
Link to comment
Estas utilizando mas de un shader? Generalmente ese es el problema ya que algunos shaders utilizan las mismas técnicas.

Utilizo 2 uno que hace la pantalla a blanco y negro y otro que remplaza la mira de las armas

Link to comment
  • Recently Browsing   0 members

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