save code

This commit is contained in:
xsl
2025-12-20 22:34:23 +08:00
parent b6ac86a134
commit 7b07e7fbc1
15 changed files with 265 additions and 194 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 445 KiB

After

Width:  |  Height:  |  Size: 14 KiB

+8 -5
View File
@@ -5,17 +5,20 @@ layout (binding = 1) uniform sampler2D samplerColor;
layout (location = 0) in vec2 inUV;
layout (location = 1) in vec3 inNormal;
layout(push_constant) uniform PushConstantsFS {
float ux;
float uy;
} pc_fs;
layout(push_constant) uniform PushConstants {
float myValue;
float ux;
float uy;
} pushConstants;
layout (location = 0) out vec4 outFragColor;
void main()
{
vec4 color = texture(samplerColor, inUV);
vec2 pos = vec2(pushConstants.ux/2880.f, pushConstants.uy/2880.f);
vec2 uv = pos + vec2(inUV.x/8.f, inUV.y/8.f);
vec4 color = texture(samplerColor, uv);
outFragColor = color;
Binary file not shown.
+2
View File
@@ -18,6 +18,8 @@ layout (location = 1) out vec3 outNormal;
layout(push_constant) uniform PushConstants {
float myValue;
float ux;
float uy;
} pushConstants;
out gl_PerVertex
Binary file not shown.
@@ -301,9 +301,8 @@ public class FaceActivity extends GameActivity implements FaceLandmarkerHelper.L
}
protected native void ChangeMotionCpp(String json, AnimationFinishedCallbackInterface callback, boolean loop);
protected void ChangeMotion(String json, AnimationFinishedCallbackInterface callback, boolean loop){
Log.i("FaceActivity", "ChangeState:" + json);
ChangeMotionCpp(json, callback, loop);
protected void ChangeMotionList(AnimationFinishedCallbackInterface callback, boolean loop){
ChangeMotionCpp("", callback, loop);
}
// 添加这个缺失的方法
@@ -19,9 +19,9 @@ public class Motion {
try {
JSONObject jsonObject = new JSONObject();
jsonObject.put("name", name);
JSONObject jframes = new JSONObject();
JSONArray jframes = new JSONArray();
for(int i = 0; i < frames.size(); ++i){
jframes.put(frames.get(i).name, frames.get(i).toJsonObject());
jframes.put(frames.get(i).toJsonObject());
}
jsonObject.put("frames", jframes);
return jsonObject;