Results 1 to 8 of 8
  1. #1
    FORCE™'s Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    Omg ure a pedaphile
    Posts
    4,225
    Reputation
    69
    Thanks
    667
    My Mood
    Goofy

    Coding Help For Rez File

    anyone know coding, i got this from a fx file. i opened the fx file with nvidea fx composer. i dont understand any of the coding there but maybe someone else does.

    Code:
    /*
    	Copyright Doobic entertainment Corporation 2006
    	
    	Title : Blur
    	Information : Gaussian focus blur
    					Compile VS 2.0, PS 2.0
    	
    	Last Date : 2006 / 5 / 19
    	Author : Jung Hwan Ji (Russiac)
    */
    
    texture tTexture;
    texture tBlurTexture;
    texture tDotTexture;
    float2 vViewportSize;
    
    sampler2D g_Screen = sampler_state
    {
    	Texture = <tTexture>;
    	
    	MinFilter = Linear;
    	MagFilter = Linear;
    	
    	AddressU = Clamp;
    	AddressV = Clamp;
    };
    
    sampler2D g_BlurScreen = sampler_state
    {
    	Texture = <tBlurTexture>;
    	
    	MinFilter = Linear;
    	MagFilter = Linear;
    	
    	AddressU = Clamp;
    	AddressV = Clamp;
    };
    
    sampler2D g_DotTexture = sampler_state
    {
    	Texture = <tDotTexture>;
    	
    	MinFilter = Linear;
    	MagFilter = Linear;
    	
    	AddressU = Clamp;
    	AddressV = Clamp;
    };
    
    struct VS_OUTPUT {
    	float4		Pos : POSITION0;
    	float2		Tex : TEXCOORD0;
    };
    
    VS_OUTPUT CommonVS(float3 Pos : POSITION0)
    {
    	VS_OUTPUT output = (VS_OUTPUT)0;
    	
    	float4 outPos = float4(Pos, 1.0f);
    	outPos.xy = sign(outPos.xy);
    	output.Pos = float4(outPos.xy, 0.0f, 1.0f);
    	
    	output.Tex = 0.5f * outPos.xy + 0.5f;
    	output.Tex.y = 1.0f - output.Tex.y;
    	
    	return output;
    }
    
    float4 DownSamplingPS(float2 Tex : TEXCOORD0) :COLOR0
    {
    	float2 texCoordSample = 0;
    	float4 cOut;
    	
    	float2 pixelSize = 1.0f / float2(vViewportSize.x, vViewportSize.y);
    	
    		texCoordSample.x = Tex.x - pixelSize.x;
    		texCoordSample.y = Tex.y + pixelSize.y;
    		cOut = tex2D(g_Screen, texCoordSample);
    		
    		texCoordSample.x = Tex.x + pixelSize.x;
    		texCoordSample.y = Tex.y + pixelSize.y;
    		cOut += tex2D(g_Screen, texCoordSample);
    		
    		texCoordSample.x = Tex.x + pixelSize.x;
    		texCoordSample.y = Tex.y - pixelSize.y;
    		cOut += tex2D(g_Screen, texCoordSample);
    		
    		texCoordSample.x = Tex.x - pixelSize.x;
    		texCoordSample.y = Tex.y - pixelSize.y;
    		cOut += tex2D(g_Screen, texCoordSample);
    	
    	return cOut * 0.25f; 
    }
    
    float4 Gaussian1PS(float2 Tex : TEXCOORD0) :COLOR0
    {
    	float2 texCoordSample = 0;
    	float4 cOut;
    	
    	float2 pixelSize = 8.0f / float2(vViewportSize.x, vViewportSize.y);
    	
    		cOut = 0.5f * tex2D(g_BlurScreen, Tex);
    		texCoordSample.x = Tex.x;
    		texCoordSample.y = Tex.y + pixelSize.y;
    		cOut += 0.25f * tex2D(g_BlurScreen, texCoordSample);
    		
    		texCoordSample.y = Tex.y - pixelSize.y;
    		cOut += 0.25f * tex2D(g_BlurScreen, texCoordSample);
    	
    	return cOut;
    }
    
    float4 Gaussian2PS(float2 Tex : TEXCOORD0) :COLOR0
    {
    	float2 texCoordSample = 0;
    	float4 cOut;
    	
    	float2 pixelSize = 8.0f / float2(vViewportSize.x, vViewportSize.y);
    	
    		cOut = 0.5f * tex2D(g_Screen, Tex);
    		texCoordSample.y = Tex.y;
    		texCoordSample.x = Tex.x + pixelSize.x;
    		cOut += 0.25f * tex2D(g_Screen, texCoordSample);
    		
    		texCoordSample.x = Tex.x - pixelSize.x;
    		cOut += 0.25f * tex2D(g_Screen, texCoordSample);
    	
    	return cOut;
    }
    
    float4 MurgePS(float2 Tex : TEXCOORD0) :COLOR0
    {
    	float4 cOut;
    	
    	float4 DotColor = tex2D(g_DotTexture, Tex);
    	float4 SrcColor = tex2D(g_Screen, Tex);
    	float4 BlurColor = tex2D(g_BlurScreen, Tex);
    	
    	cOut = SrcColor * DotColor.a;
    	cOut += BlurColor * (1.0f - DotColor.a);
    
    	return cOut;
    }
    
    //-----------------------------------------------------------------------------------------
    // Techniques
    //-----------------------------------------------------------------------------------------
    technique Blur
    {
        pass P0
        {   
        		ZWriteEnable = false;
        		ZEnable = false;
        		Lighting = false;
            VertexShader = compile vs_2_0 CommonVS();
            PixelShader = compile ps_2_0 DownSamplingPS();
        }
        
        pass P1
        {   
        ZWriteEnable = false;
        		ZEnable = false;
        		Lighting = false;
            VertexShader = compile vs_2_0 CommonVS();
            PixelShader = compile ps_2_0 Gaussian1PS();
        }
    
    	pass P2
        {   
        ZWriteEnable = false;
        		ZEnable = false;
        		Lighting = false;
            VertexShader = compile vs_2_0 CommonVS();
            PixelShader = compile ps_2_0 Gaussian2PS();
        }
      
        pass P3
        {
        		ZWriteEnable = false;
        		ZEnable = false;
        		Lighting = false;
        		VertexShader = compile vs_2_0 CommonVS();
           	PixelShader = compile ps_2_0 MurgePS();
        }
    }


    LIVERPOOL FC


  2. #2
    No5cope's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    1,902
    Reputation
    26
    Thanks
    678
    My Mood
    Aggressive
    from what i can understand, this is the blur u get from scoping in.. i could be wrong.. but thats what it sounds like to me

    i would go about changing this, not a wise idea, unles u fuly know what you are doing

  3. #3
    FORCE™'s Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    Omg ure a pedaphile
    Posts
    4,225
    Reputation
    69
    Thanks
    667
    My Mood
    Goofy
    yeh the file is called blur, wow maybe no fog hack here


    LIVERPOOL FC


  4. #4
    No5cope's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    1,902
    Reputation
    26
    Thanks
    678
    My Mood
    Aggressive
    Quote Originally Posted by sendi11 View Post
    yeh the file is called blur, wow maybe no fog hack here
    hmm thats kind of what i was thinking

  5. #5
    FORCE™'s Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    Omg ure a pedaphile
    Posts
    4,225
    Reputation
    69
    Thanks
    667
    My Mood
    Goofy
    i have another 5 of these files, do u want me to post them

    wow theres one called night vission.fx


    LIVERPOOL FC


  6. #6
    No5cope's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    1,902
    Reputation
    26
    Thanks
    678
    My Mood
    Aggressive
    Quote Originally Posted by sendi11 View Post
    i have another 5 of these files, do u want me to post them

    wow theres one called night vission.fx
    OMG! YES! NIGHT VISION!!! FUCK YES!!!!

    nah dont post em.. what rez file are they in?

  7. #7
    FORCE™'s Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    Omg ure a pedaphile
    Posts
    4,225
    Reputation
    69
    Thanks
    667
    My Mood
    Goofy
    they are in shaders.rez


    LIVERPOOL FC


  8. #8
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    Quote Originally Posted by sendi11 View Post
    they are in shaders.rez
    Can you rebuild it after you edited the code?

    And yeah it´s something with the fog!

    Have you tried remove the shader file and start ca and see whats the diffrent?
    -Rest in peace leechers-

    Your PM box is 100% full.

Similar Threads

  1. [Help] One Hit kill code help for weapon M16
    By SmartGold in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 14
    Last Post: 04-20-2011, 04:57 PM
  2. [HELPFUL]Backup rez files... UPDATED!
    By Solley in forum Combat Arms Mods & Rez Modding
    Replies: 27
    Last Post: 04-01-2010, 08:38 PM
  3. help editing rez FILE PLZ HELP!
    By uzair786uzzy in forum Combat Arms Mod Discussion
    Replies: 2
    Last Post: 12-08-2009, 09:11 PM
  4. [Help/Request]REZ Files
    By Kevin in forum Combat Arms Mod Discussion
    Replies: 3
    Last Post: 12-07-2009, 07:48 PM
  5. Help With Rez File
    By GoBxHiTz in forum CrossFire Hacks & Cheats
    Replies: 0
    Last Post: 06-10-2009, 12:18 PM