UnityEngine.RenderTexture.GetTexelOffset C# (CSharp) Method

GetTexelOffset() private method

private GetTexelOffset ( ) : Vector2
return Vector2
        public Vector2 GetTexelOffset()
        {
            return Vector2.zero;
        }

Usage Example

Example #1
0
    // =============================================================================
    // =============================================================================
    // METHODS STATIC --------------------------------------------------------------
    private static void Render4TapQuad( RenderTexture dest, float offsetX, float offsetY )
    {
        GL.Begin( GL.QUADS );

        // Direct3D needs interesting texel offsets!
        Vector2 off = Vector2.zero;
        if( dest != null )
        {
            off = dest.GetTexelOffset()*0.75f;
        }

        Set4TexCoords( off.x, off.y, offsetX, offsetY );
        GL.Vertex3( 0f, 0f, 0.1f );

        Set4TexCoords( 1.0f + off.x, off.y, offsetX, offsetY );
        GL.Vertex3( 1f, 0f, 0.1f );

        Set4TexCoords( 1.0f + off.x, 1.0f + off.y, offsetX, offsetY );
        GL.Vertex3( 1f, 1f, 0.1f );

        Set4TexCoords( off.x, 1.0f + off.y, offsetX, offsetY );
        GL.Vertex3( 0f, 1f, 0.1f );

        GL.End();
    }
All Usage Examples Of UnityEngine.RenderTexture::GetTexelOffset