Commit Graph

17 Commits

Author SHA1 Message Date
bjorn 8462beef00 Fix/improve alpha cutoff;
The current flag did not work because float shader flags are not
supported.  It was also not very useful because it was per-shader
and did not use the alpha cutoff property of glTF materials.

Instead, let's turn the shader flag into an enable/disable boolean,
and add a scalar material property named "alphacutoff" that gets
read by the glTF importer.

When the alphaCutoff flag is enabled, the material property will be
compared against the pixel's alpha value to decide whether it should
get discarded.
2021-12-28 21:10:52 +02:00
bjorn 72a54bce2f Support STL models;
Only binary STL files are supported right now, ASCII is more challenging.
2021-02-23 12:07:16 -07:00
bjorn 023067ec27 util.h no longer uses atomics; 2021-02-11 16:37:55 -07:00
bjorn 8164e0b6e8 TextureData is now named Image!;
The existing Image construct was renamed StorageImage.
2021-02-08 20:17:47 -07:00
bjorn 3ded60948f rm core/ref; rm lovrAlloc; util does refcounting; 2021-02-08 17:26:44 -07:00
bjorn c02839f5c2 Allow anisotropy to be used with any TextureFilter;
Instead of anisotropic being its own filter, it is now removed and
anisotropy settings can be used with any of the other filter modes.
2020-03-05 09:46:49 -08:00
bjorn 443376efde ModelData: Use union for transform fields;
Nodes can have either a transform matrix, or decomposed transform
properties, but never both.  Using a union means we can store both
of those variants in the same piece of memory, using the existing
matrix boolean to figure out which one to use.

This reduces the size of the struct by 48 bytes (152 -> 104), which
ends up speeding up some model operations, I'm guessing due to the
CPU cache.
2020-02-11 16:38:31 -08:00
bjorn 2f9400a5f7 Adjust includes; 2019-12-10 13:01:28 -08:00
bjorn 403ed8d3b0 Windows; 2019-12-10 12:19:50 -08:00
bjorn d21911d010 Add core/map hash table; rm lib/map; 2019-10-30 00:07:05 -07:00
bjorn bd773d2d6c Add materialMap to ModelData; 2019-08-09 15:14:22 -07:00
bjorn 96c47d590c rm lovrEnvironmentTexture from Material; 2019-08-05 15:20:17 -07:00
bjorn 3c07ad6b0b Replace Animator with Model:animate; 2019-07-10 22:08:19 -07:00
bjorn dc34ed4570 Start to trend towards 4-element arrays for vec3;
It will be important for enabling more SIMD.
2019-06-02 20:35:52 -07:00
bjorn 4cc154fdfa More number conversions; 2019-05-20 20:35:07 -07:00
bjorn df6b7fc96a Ref is mostly private now;
It's really nice how objects don't need to care about how they're
allocated/managed now.
2019-05-20 15:09:06 -07:00
bjorn a17f10e273 Add modules folder; 2019-05-19 00:38:35 -07:00
Renamed from src/data/modelData.h (Browse further)