Skip to content

Commit

Permalink
Fixed some mirrored textures
Browse files Browse the repository at this point in the history
  • Loading branch information
llbit committed May 5, 2013
1 parent c287307 commit d6e16f2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*.properties text
*.java text
*.properties eol=lf
*.java eol=lf
*.txt eol=crlf
3 changes: 3 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1.1.12 - TBD
* Fixed some mirrored textures

1.1.11 - 2013-04-28
* It is now possible to lock the render controls to avoid inadvertent
render restarts. The locking can be either manual or automatic.
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/se/llbit/chunky/model/TexturedBlockModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ else if (ray.n.y > 0)
public static boolean intersect(Ray ray, Texture texture) {
ray.t = Double.POSITIVE_INFINITY;
if (block.intersect(ray)) {
if (ray.n.x > 0 || ray.n.z < 0)
ray.u = 1-ray.u;
float[] color = texture.getColor(ray.u, ray.v);
if (color[3] > Ray.EPSILON) {
ray.color.set(color);
Expand Down
4 changes: 2 additions & 2 deletions src/main/res/se/llbit/chunky/main/messages.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Chunky.appname=Chunky
Chunky.version=1.1.11b
Chunky.revision=R20130428
Chunky.version=1.1.12 snapshot
Chunky.revision=R20130505
Chunky.icon=/chunky-icon.png
Controls.SelectWorld_lbl=Select World
Controls.DeleteSelected_lbl=Delete Selected Chunks
Expand Down

0 comments on commit d6e16f2

Please sign in to comment.