Veykril / cubism-rs

A rust wrapper around the Live2D Cubism SDK with extra functionality
Apache License 2.0
39 stars 10 forks source link

Fix rendering #18

Closed 3c1u closed 5 years ago

3c1u commented 5 years ago

Not using DynamicFlags::IS_VISIBLE flag on drawing masks.

3c1u commented 5 years ago

Also fixed the shader compilation error on macOS.

layout (location = 0) in vec2 out_tex_coords; // consumes `out_tex_coords` from a vertex shader.
...
    vec4 color = texture(us_tex0, out_tex_coords); // uses texture instead of texture2D (deprecated)

I don't know if this works on Windows.

Veykril commented 5 years ago

Ah ye, didn't notice I was using a deprecated function there. The name of the input variable doesn't matter though since i've linked them with the layout (location = 0) attribute from what I know.

3c1u commented 5 years ago

Even though the layout is specified, the shader compiler on macOS warns (and panics) saying that “out_**” was not used. I don’t know why.

Veykril commented 5 years ago

Huh interesting, well it doesn't really matter anyways.