Пример #1
0
    public override void SetShaderParams()
    {
        MainShader.SetInt("L_WIDTH", (int)LifeDimentions.x);
        MainShader.SetInt("L_HEIGHT", (int)LifeDimentions.y);

        MainShader.SetVector("displacement", displacement);
    }
Пример #2
0
    public override void SetShaderParams()
    {
        MainShader.SetMatrix("_CameraToWorld", _Camara.cameraToWorldMatrix);
        MainShader.SetMatrix("_CameraInverseProjection", _Camara.projectionMatrix.inverse);

        MainShader.SetTexture(KERNEL_ID_Render, "_SkyboxTexture", SkyboxTexture);

        MainShader.SetVector("_PixelOffset", new Vector2(Random.value, Random.value));

        var light = DirectionalLight.transform.forward;

        MainShader.SetVector("_DirectionalLight", new Vector4(light.x, light.y, light.z, DirectionalLight.intensity));
    }