mmikk / hextile-demo Goto Github PK
View Code? Open in Web Editor NEWdemonstrates hex-tiling
License: MIT License
demonstrates hex-tiling
License: MIT License
Hi there, and thanks for this repo! Just tried building it in vs2019 and if I run the generated hextile-demo.exe then I get a window but no geometry (and hence no hex tiling) just sky.
Hello! Thanks for sharing your excellent project. I found a small bug in how you correct for the rotation the algorithm applies to the sampling of the normal map.
On this line:
https://github.com/mmikk/hextile-demo/blob/main/hextile-demo/hextiling.h#L89
d1 = mul(rot1, d1); d2 = mul(rot2, d2); d3 = mul(rot3, d3);
The code applies the same rotation to the derivatives as to the st parameter. This will have the net effect of showing a doubly-rotated normal. What you really want is to apply the inverse rotation. Since the rot matrix is orthogonal, you can simply take the tranpose of the rot matrices like so:
d1 = mul(transpose(rot1), d1); d2 = mul(transpose(rot2), d2); d3 = mul(transpose(rot3), d3);
This seemed to work for me in my local testing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.