Navigation Menu

Skip to content

Commit

Permalink
Fix ortho matrix compilation
Browse files Browse the repository at this point in the history
Caused very large grids and slow down when in ortho mode
  • Loading branch information
dgud committed Oct 25, 2015
1 parent ae50191 commit 9f35c34
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion e3d/e3d_transform.erl
Expand Up @@ -169,7 +169,12 @@ ortho(Left, Right, Bottom, Top, Near, Far) ->
O, O, O},
%% Do this in 3 steps to avoid inverse calculation problems
Mat1 = scale(init(Mat0), {IDx,IDy,IDz}),
translate(Mat1, {-(Right+Left)*IDx, -(Top+Bottom)*IDy, -(Far+Near)*IDz}).
Trans = translate(identity(), {-(Right+Left)*IDx,
-(Top+Bottom)*IDy,
-(Far+Near)*IDz}),
mul(Trans, Mat1).



%%--------------------------------------------------------------------
%% @doc Generates a perspective transformation
Expand Down

0 comments on commit 9f35c34

Please sign in to comment.