Commit graph

72 commits

Author SHA1 Message Date
45cc6dac00 Animation & blend file: Preliminary support for actions. 2024-12-16 21:34:55 +01:00
fc39a93a94 Blend file: Use alpha blending flag, add alpha in principled & teximage nodes. 2024-12-16 21:30:37 +01:00
11ef0fbd41 Generic platform: Add procs for reading assets and for key/character events. 2024-12-16 21:27:26 +01:00
b4c7061fc9 Shader library: Fix SH9 not working with some devices because of buggy vec3. 2024-12-16 21:24:42 +01:00
6d6c807ff2 Material: Add -d:myouStoreGLSL and setOverrideXXCode() to live edit shaders. 2024-12-16 21:21:18 +01:00
8155c53314 Blend loader: Add texture cache. 2024-12-16 21:17:43 +01:00
67307032da Textures: Add several defines and constructor options for compression, cache.
* Add defines `myouForceAstc`, `myouMinTextureChannels`, 
  `myouLoadUncompressedTextures` and `myouAllCacheFilesExist`.
* Suppress warning messages about emulation for `myouForceAstc`.
* Add argument `use_compression` to `newTexture` (default `true`)
2024-12-16 21:05:21 +01:00
0192db3f67 Implement shape keys, vertex modifier support. Fix related bugs. 2024-12-16 21:02:13 +01:00
12940dad1d Android: Add APK reading, closing app. Fix JNI env not attached to thread. 2024-12-04 13:32:01 +01:00
e0b02d2708 Screen: Add frame_inset and display_scale, and implement them in Android. 2024-12-04 13:11:09 +01:00
bb4f8e1c00 Change new_scenes to new_del_scenes to avoid issues when deleting a scene. 2024-11-30 00:53:26 +01:00
2caf78c88a Mesh: Fix vertex_count, vertex_array in newMesh. Fix add_polygonal_line() 2024-11-30 00:48:43 +01:00
893208f4c2 Add docstrings to gameobject, mesh, light, camera, scene, screen, attributes. 2024-11-30 00:17:06 +01:00
080d9bcc67 Loadable: add registerLogUriHandler() to get a log of loaded URIs. 2024-11-29 13:32:46 +01:00
6212b816f0 Loadable: Add registerCustomProtocol() for e.g. reading assets in mobile. 2024-11-29 13:30:32 +01:00
6794b35978 Add a forgotten conditional in simple_shadow.nim 2024-09-21 02:27:10 +02:00
29e4735626 Util: Remove unused JS functions, add min/max(vec), improve remove, add docs. 2024-09-21 02:21:25 +02:00
40b70003ec GameObject: Document many of its functions.
Also rename `get_dimensions` to `get_local_dimensions`, add
`get_world_dimensions` for consistency, and add `children_recursive_and_self`.
2024-09-21 02:19:44 +02:00
f71ae37821 GameObject: Fix rotation in get_local_matrix. 2024-09-21 02:16:39 +02:00
f03d1929cb Blend format: fix crash when trying to load a data block of missing type. 2024-09-21 02:15:26 +02:00
1abd60e48f Blend format: load some custom properties in objects. 2024-09-21 02:14:24 +02:00
61c1986c92 Screen: add get_pixels_at_depth. 2024-09-21 02:13:26 +02:00
55d0c859ab Add rudimentary error management to loader callbacks. 2024-09-21 02:10:53 +02:00
dca0123f13 Fix many issues related to shadows. 2024-09-21 02:09:22 +02:00
1640040f93 Fix some textures not being destroyed when it should. 2024-09-21 02:06:32 +02:00
01229cc2b5 Enable shadow samplers by default. 2024-09-13 18:43:18 +02:00
c1291c0412 Destroy cubemaps with the scene. 2024-09-13 18:43:01 +02:00
7efd3bb160 Add condition for compilation without threads in gl.nim. 2024-09-13 18:39:47 +02:00
6180767bf2 Add break_current_callbacks to block other callbacks in the same frame. 2024-09-13 02:42:11 +02:00
8075edf619 Prevent mem leaks with destructors for all GPU objects and other measures. 2024-09-13 02:37:02 +02:00
52a4c00ffe Fix shadows not compiling without myouDebugShadows. 2024-09-13 02:31:47 +02:00
60a896f513 Workaround for images with less channels than the supposed texture format. 2024-09-13 02:18:37 +02:00
5b588fddf1 Allow compilation with threads off. 2024-09-13 02:15:32 +02:00
c77187fa9f Revamp shadow map system into a working state. Fix related bugs.
* `light.configure_shadow` has been added. It can either use a camera frustum or
  calculate the bounds for a static shadow that doesn't need to be updated every
  frame.
* `Light` and `newLight` have `use_shadow`, however it's not used automatically
  at the moment. Instead you should call `configure_shadow`.
* Added `updateShadowStorage` which at the moment has to be called manually
  after using `configure_shadow`.
* All shadows now share a single texture array per scene, so they can be
  accessed by index in the shader and take less shader locations and draw calls.
* Shadow map resolution is also global per scene.
* Add `set_texture_shadow` and `unset_texture_shadow` to configure a texture as
  shadow sampler.
* Bias has been removed as an option, it's calculated automatically instead.
* Bias now moves along the normal of the mesh instead of towards the light,
  allowing very small biases.
2024-09-11 20:49:00 +02:00
c8f9beaff9 Add all missing files in the packages directory. 2024-09-11 12:10:54 +02:00
b60c837c47 Create quickhull.nim with quickhull and quickhull_points functions. 2024-09-11 12:10:54 +02:00
7b54183f31 Fix some mysterious warnings when using enqueue. 2024-09-11 12:10:54 +02:00
67f009c157 Framebuffer: allow usage of texture arrays and changing type of depth texture. 2024-09-11 12:10:54 +02:00
17d6ccc32d Fix missing tex_type in one of newTexture. Prevent nil access in destroy. 2024-09-10 00:57:16 +02:00
90abbac26b SliceMem: change newSliceMem(ptr, len...) to match an example, add another. 2024-09-10 00:52:39 +02:00
dd75d19399 Use quality settings for BCn formats in texture_optimize. 2024-09-10 00:50:33 +02:00
f7108225bd Add some documentation and fix fixdocs.nim. 2024-09-06 01:16:06 +02:00
45dc99b483 Add CacheSettings for automatically saving and loading compressed textures. 2024-09-06 01:14:35 +02:00
a8a0b35297 SliceMem: Add serialize, deserialize, toString, copy and documentation. 2024-09-06 01:08:58 +02:00
83011ea344 Add use_threads option to loadUri. 2024-09-05 16:48:35 +02:00
41c7c7092a Fix typo in align in utils. 2024-09-05 16:47:33 +02:00
82be9ea1db Fix issue when trying to load another .blend with same loader after it failed. 2024-09-05 00:24:08 +02:00
7f0ebc122a Add support for BCn texture compression formats (except BC2, BC6) with BC7enc. 2024-09-05 00:22:05 +02:00
e4b918b384 Call gladLoadGLES2 in mobile to properly detect supported extensions. 2024-09-04 02:44:26 +02:00
d9778546b5 Fix GLAD bug where it wasn't reading OpenGL ES version correctly. 2024-09-04 02:43:22 +02:00