예제 #1
0
    private void OnPostRender()
    {
        float ar = (Screen.width * 1f) / (Screen.height * 1f);

        fisheyeMaterial.SetVector("intensity", new Vector4(strengthX * ar * ONE_OVER_BASE_SIZE, strengthY * ONE_OVER_BASE_SIZE, strengthX * ar * ONE_OVER_BASE_SIZE, strengthY * ONE_OVER_BASE_SIZE));
        IndieEffects.FullScreenQuad(fisheyeMaterial);
    }
예제 #2
0
 public void OnGUI()
 {
     bloomMat.SetFloat("_Threshold", threshold);
     bloomMat.SetFloat("_Amount", amount);
     bloomMat.SetTexture("_MainTex", fxRes.RT);
     bloomMat.SetTexture("_BlurTex", fxRes.RT);
     IndieEffects.FullScreenQuad(bloomMat);
 }
예제 #3
0
 public void OnPostRender()
 {
     DOFMat.SetTexture("_MainTex", fxRes.RT);
     DOFMat.SetTexture("_Depth", fxRes.DNBuffer);
     DOFMat.SetFloat("_FStop", FStop * 10);
     DOFMat.SetFloat("_Amount", BlurAmount);
     IndieEffects.FullScreenQuad(DOFMat);
 }
예제 #4
0
    public void OnPostRender()
    {
        float oneOverBaseSize = 80.0f / 512.0f;

        float ar = (Screen.width * 1.0f) / (Screen.height * 1.0f);

        fisheyeMaterial.SetVector("intensity", new Vector4(strengthX * ar * oneOverBaseSize, strengthY * oneOverBaseSize, strengthX * ar * oneOverBaseSize, strengthY * oneOverBaseSize));
        IndieEffects.FullScreenQuad(fisheyeMaterial);
    }
예제 #5
0
 private void OnPostRender()
 {
     IndieEffects.FullScreenQuad(sampleMat);
     RadialBlurQuad1(sampleMat);
     RadialBlurQuad2(sampleMat);
     RadialBlurQuad3(sampleMat);
     RadialBlurQuad4(sampleMat);
     RadialBlurQuad5(sampleMat);
     RadialBlurQuad6(sampleMat);
 }
예제 #6
0
    public void OnPostRender()
    {
        Matrix4x4 viewProjection = camera.projectionMatrix * camera.worldToCameraMatrix;
        //vector map generation
        Matrix4x4 inverseViewProjection = viewProjection.inverse;

        blurMat.SetMatrix("_inverseViewProjectionMatrix", inverseViewProjection);
        blurMat.SetMatrix("_previousViewProjectionMatrix", previousViewProjectionMatrix);
        blurMat.SetFloat("_intensity", intensity);
        blurMat.SetTexture("_MainTex", fxRes.RT);
        blurMat.SetTexture("_Depth", fxRes.DNBuffer);
        IndieEffects.FullScreenQuad(blurMat);
        previousViewProjectionMatrix = viewProjection;
    }
예제 #7
0
    private void OnPostRender()
    {
        tex.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0);
        tex.Apply();
        float tmpOffset = Mathf.Clamp(offset, 0.0f, 10.0f);

        mat.SetFloat("_OffsetScale", tmpOffset);

        float tmpAmount = Mathf.Clamp(amount, 0.0f, 10.0f);

        mat.SetFloat("_Amount", tmpAmount);

        IndieEffects.FullScreenQuad(mat);
    }
예제 #8
0
 private void OnPostRender()
 {
     IndieEffects.FullScreenQuad(bloomMat);
 }
예제 #9
0
 public void OnPostRender()
 {
     chromMat.SetTexture("_MainTex", fxRes.RT);
     chromMat.SetTexture("_Vignette", vignette);
     IndieEffects.FullScreenQuad(chromMat);
 }
예제 #10
0
 public void OnPostRender()
 {
     IndieEffects.FullScreenQuad(materialAO);
 }
예제 #11
0
 private void OnPostRender()
 {
     IndieEffects.FullScreenQuad(ThermoMat);
 }
예제 #12
0
파일: AA.cs 프로젝트: marcoscirea/Structure
    private void OnPostRender()
    {
        // .............................................................................
        // FXAA antialiasing modes .....................................................

        if (mode == AAMode.FXAA3Console && (materialFXAAIII != null))
        {
            materialFXAAIII.SetFloat("_EdgeThresholdMin", edgeThresholdMin);
            materialFXAAIII.SetFloat("_EdgeThreshold", edgeThreshold);
            materialFXAAIII.SetFloat("_EdgeSharpness", edgeSharpness);

            IndieEffects.FullScreenQuad(materialFXAAIII);
        }
        else if (mode == AAMode.FXAA1PresetB && (materialFXAAPreset3 != null))
        {
            IndieEffects.FullScreenQuad(materialFXAAPreset3);
        }
        else if (mode == AAMode.FXAA1PresetA && materialFXAAPreset2 != null)
        {
            IndieEffects.renderTexture.anisoLevel = 4;
            IndieEffects.FullScreenQuad(materialFXAAPreset2);
            IndieEffects.renderTexture.anisoLevel = 0;
        }
        else if (mode == AAMode.FXAA2 && materialFXAAII != null)
        {
            IndieEffects.FullScreenQuad(materialFXAAII);
        }
        else if (mode == AAMode.SSAA && ssaa != null)
        {
            // .............................................................................
            // SSAA antialiasing ...........................................................

            IndieEffects.FullScreenQuad(ssaa);
        }
        else if (mode == AAMode.DLAA && dlaa != null)
        {
            // .............................................................................
            // DLAA antialiasing ...........................................................

            IndieEffects.renderTexture.anisoLevel = 0;
            IndieEffects.FullScreenQuad(dlaa);
            IndieEffects.FullScreenQuad(dlaa);
        }
        else if (mode == AAMode.NFAA && nfaa != null)
        {
            // .............................................................................
            // nfaa antialiasing ..............................................

            IndieEffects.renderTexture.anisoLevel = 0;

            nfaa.SetFloat("_OffsetScale", offsetScale);
            nfaa.SetFloat("_BlurRadius", blurRadius);

            IndieEffects.FullScreenQuad(nfaa);
        }
        else
        {
            // none of the AA is supported, fallback to a simple blit
            IndieEffects.FullScreenQuad(null);
        }
    }
예제 #13
0
 public void OnPostRender()
 {
     IndieEffects.FullScreenQuad(blurMat);
 }
예제 #14
0
 private void OnPostRender()
 {
     IndieEffects.FullScreenQuad(DOFMat);
     texmonitor = _Depth.DepthTex;
 }