When textures are displayed incorrectly

[Last updated 11/24/2021]

 

Translucent areas darken

NativeCompornent, SDK for Native

Cause

Occurs when a pre-multiplied alpha image is read in as a non-multiplied file.
The reason for this is that the colors are darkened due to the double multiplication of alpha values during compositing and image creation.

If translucent areas such as cheeks are rendered correctly, this is a different problem.

 

Counter-measure

Set True in CubismRenderer::IsPremultipliedAlpha or convert the image to a form that does not use multiplied alpha.

 

Translucent portions emit light

NativeCompornent, SDK for Native

Cause

The cause is the same as in the case of darkening, but the phenomenon is caused by the opposite setting.
This occurs when an image that is not a multiplied alpha image is treated as a multiplied alpha file.
The image is synthesized as if it were glowing in order to synthesize it brighter as if it were darker.

Counter-measure

Set False in CubismRenderer::IsPremultipliedAlpha or convert the image to a multiplied alpha.

 

Noticeable jaggies, mussed borders

NativeCompornent, SDK for Native, Unity

Cause

When drawn without a mipmap, the switching occurs sharply,
giving the impression of being anti-aliased, mussed, jaggy, etc.

 

Measures (Unity)

Check Generate Mip Maps on the texture inspector to generate mip maps.

 

Measures (Native)

In OpenGL, select GL_LINEAR_MIPMAP_LINEAR or GL_LINEAR for texture usage.
It also generates a mipmap with glGenerateMipmap.

 

There is a faint border

Unity

Causes and Countermeasures

This happens when the Alpha Is Transparency on the texture inspector is off.
After checking the box, press Apply in the lower right corner.

 

Low resolution (in some cases)

NativeCompornent, SDK for Native, Unity

Cause

This occurs when the image is completed using only one of the most recent points (Point (no filter) or GL_NEAREST).

Measures (Unity)

Change the Filter Mode to Bilinear or Trilinear on the texture inspector.

 

Measures (Native)

Set the mipmap use setting as Liner as when jaggies appear.

 

UV distorted on some mobile devices

Cubism SDK for Native, Cubism SDK for Web

Cause

If the floating point precision of the values used in OpenGL's FragmentShader is low, the UVs of the mesh may be at unintended coordinates depending on the terminal where it is run.

Counter-measure

Change the precision mediump float defined in FragmentShader to a precision highp float.

 

© 2010 - 2022 Live2D Inc.