Used in Tsuma Shibori, and some indie System 4 games.
This HLL is a draw plugin that uses SACT2's "custom sprite" mechanism.
Custom sprites do not have a texture. Instead, the plugin's render()
callback draws them directly to the main surface.
This fixes "incomplete framebuffer" error in Haru Urare right after the
game start, due to gfx_set_framebuffer() being called with a zero width
texture. It was a regression introduced by commit 04d5237, which started
using gfx_set_framebuffer() in gfx_init_texture_rgba().
Ideally, we should avoid creating zero-area textures in upper layers
(commit 3f18b18 was an attempt to do so), but this is difficult because
there are many places that create textures. Let's just make sure that we
don't generate unrecoverable errors.
In ReignEngine, alpha blending is the default. Alpha testing is used if
the mesh/material has the (sprite) attribute.
In TapirEngine, alpha testing is the default. Alpha blending is used if
the mesh/material has the (alpha) attribute.
Before this, the BoneTransforms uniform block consumed
(4 * 4 * sizeof(float) * MAX_BONES) = 19712 bytes, which exceeds 16384,
the minimum possible value of GL_MAX_UNIFORM_BLOCK_SIZE in OpenGL ES
3.2.
Since the bone matrices are affine, we can drop the 4th rows and pack
them into a mat4x3 array. Now the BoneTransforms block is 14784 bytes
and it should work with all OpenGL ES 3.2 implementations.
In TapirEngine, the following lighting features are not used:
- global ambient
- directional lights
- specular lights
- rim lights
- fog
(The setters / getters for these parameters are still there, but they
don't affect rendering.)
This implementation disables those features in GLSL using #ifdefs. The C
code that sets up the lighting remains almost unchanged --
glGetUniformLocation() will return -1 if the specified uniform variable
name is not found, and glUniform*(-1, ...) will be no-op.
It is exposed through StoatSpriteEngine functions, and is normally only
visible when the game's debug mode is enabled. It's very useful for
checking graphics performance.
This is the maximum number of bones in a model for Rance Quest
(pasuteru_full.POL).
Now bone transform matrices are stored in a uniform buffer object,
because its size exceeds GL_MAX_VERTEX_UNIFORM_COMPONENTS in iOS Safari.
- Use glm_look_anyup() to avoid singularities when the shadow light
direction is parallel to the up vector
- Fix bounding sphere calculation when there are multiple shadow casters
In Rance Quest (e.g. mapF_ew01), some materials use the same image for
both color map and alpha map. In that case, the alpha channel of the
color map can be used, so ignore the alpha map.
Collision detection is based on a mesh named "collision" in the map's 3D
model. The "collision" mesh specifies the area in which the character
can move in the xz plane, and the y coordinate represents the height of
the map at that point.
Now cglm 0.9.2 is required, for 2D AABB operations.