Skip to content

Commit

Permalink
game
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Apr 11, 2024
1 parent e370c15 commit 671a1fa
Show file tree
Hide file tree
Showing 47 changed files with 90,475 additions and 440 deletions.
1 change: 0 additions & 1 deletion CNAME

This file was deleted.

2 changes: 2 additions & 0 deletions WEB-INF/deploy/html/rpcPolicyManifest/manifest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Module html
# RPC service class, partial path of RPC policy file
22,356 changes: 22,356 additions & 0 deletions WEB-INF/deploy/html/symbolMaps/90A469982974169B0E5BBF8F4D7FB154.symbolMap

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" ?>
<web-app>
</web-app>
17 changes: 17 additions & 0 deletions assets/assets.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
d:assets:assets:0:application/unknown:1
i:floor-texture.png:floor-texture-f699fe9145c4d7bcce54edfbc72176ad.png:1706939:image/png:1
t:fragment.glsl:fragment-0bbb7f7363e9f3501fe1e09a7d1019db.glsl:381:application/unknown:1
b:idle.g3db:idle-95b7661bcdd0c6a1980f5c64c95e91e1.g3db:3846443:application/unknown:1
t:idle.g3dj:idle-f8a911ab9b367b6533189818a399cc26.g3dj:4937022:application/unknown:1
i:tex3.png:tex3-7397052e551b4fd09a06956d37d6ccd1.png:3674781:image/png:1
i:texture.png:texture-8287b4a004c877d426981702ac7a83d0.png:41667:image/png:1
i:texture2.jpg:texture2-71cc45f3e9bedd25b24152c24da3baa5.jpg:644194:image/jpeg:1
t:vertex.glsl:vertex-51528ff2a3b30605ef036d9447207f38.glsl:212:application/unknown:1
t:com/badlogic/gdx/graphics/g3d/particles/particles.fragment.glsl:particles.fragment-b90524761fdf09b0a836056d590c30b8.glsl:820:application/unknown:1
t:com/badlogic/gdx/graphics/g3d/particles/particles.vertex.glsl:particles.vertex-f25b8b2fae10b9bfa09bfdd484923148.glsl:2886:application/unknown:1
t:com/badlogic/gdx/graphics/g3d/shaders/default.fragment.glsl:default.fragment-e1c018bd48044c8b67c7bbc53145e540.glsl:5874:application/unknown:1
t:com/badlogic/gdx/graphics/g3d/shaders/default.vertex.glsl:default.vertex-28b7e77ea3f282ebd5b066ba256692c3.glsl:9096:application/unknown:1
t:com/badlogic/gdx/graphics/g3d/shaders/depth.fragment.glsl:depth.fragment-8341d5ce47fc398da575c9e294b6821b.glsl:869:application/unknown:1
t:com/badlogic/gdx/graphics/g3d/shaders/depth.vertex.glsl:depth.vertex-98a450f1f747c05eedb7122779187316.glsl:2931:application/unknown:1
t:com/badlogic/gdx/utils/lsans-15.fnt:lsans-15-5143ae9583bc43b1084f98062e054ae8.fnt:17711:application/unknown:1
i:com/badlogic/gdx/utils/lsans-15.png:lsans-15-8e00ff5b9dd15a3c18c1eb75f68c695a.png:10270:image/png:1
210 changes: 210 additions & 0 deletions assets/default.fragment-e1c018bd48044c8b67c7bbc53145e540.glsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
#ifdef GL_ES
#define LOWP lowp
#define MED mediump
#define HIGH highp
precision mediump float;
#else
#define MED
#define LOWP
#define HIGH
#endif

#if defined(specularTextureFlag) || defined(specularColorFlag)
#define specularFlag
#endif

#ifdef normalFlag
varying vec3 v_normal;
#endif //normalFlag

#if defined(colorFlag)
varying vec4 v_color;
#endif

#ifdef blendedFlag
varying float v_opacity;
#ifdef alphaTestFlag
varying float v_alphaTest;
#endif //alphaTestFlag
#endif //blendedFlag

#if defined(diffuseTextureFlag) || defined(specularTextureFlag) || defined(emissiveTextureFlag)
#define textureFlag
#endif

#ifdef diffuseTextureFlag
varying MED vec2 v_diffuseUV;
#endif

#ifdef specularTextureFlag
varying MED vec2 v_specularUV;
#endif

#ifdef emissiveTextureFlag
varying MED vec2 v_emissiveUV;
#endif

#ifdef diffuseColorFlag
uniform vec4 u_diffuseColor;
#endif

#ifdef diffuseTextureFlag
uniform sampler2D u_diffuseTexture;
#endif

#ifdef specularColorFlag
uniform vec4 u_specularColor;
#endif

#ifdef specularTextureFlag
uniform sampler2D u_specularTexture;
#endif

#ifdef normalTextureFlag
uniform sampler2D u_normalTexture;
#endif

#ifdef emissiveColorFlag
uniform vec4 u_emissiveColor;
#endif

#ifdef emissiveTextureFlag
uniform sampler2D u_emissiveTexture;
#endif

#ifdef lightingFlag
varying vec3 v_lightDiffuse;

#if defined(ambientLightFlag) || defined(ambientCubemapFlag) || defined(sphericalHarmonicsFlag)
#define ambientFlag
#endif //ambientFlag

#ifdef specularFlag
varying vec3 v_lightSpecular;
#endif //specularFlag

#ifdef shadowMapFlag
uniform sampler2D u_shadowTexture;
uniform float u_shadowPCFOffset;
varying vec3 v_shadowMapUv;
#define separateAmbientFlag

float getShadowness(vec2 offset)
{
const vec4 bitShifts = vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0);
return step(v_shadowMapUv.z, dot(texture2D(u_shadowTexture, v_shadowMapUv.xy + offset), bitShifts));//+(1.0/255.0));
}

float getShadow()
{
return (//getShadowness(vec2(0,0)) +
getShadowness(vec2(u_shadowPCFOffset, u_shadowPCFOffset)) +
getShadowness(vec2(-u_shadowPCFOffset, u_shadowPCFOffset)) +
getShadowness(vec2(u_shadowPCFOffset, -u_shadowPCFOffset)) +
getShadowness(vec2(-u_shadowPCFOffset, -u_shadowPCFOffset))) * 0.25;
}
#endif //shadowMapFlag

#if defined(ambientFlag) && defined(separateAmbientFlag)
varying vec3 v_ambientLight;
#endif //separateAmbientFlag

#endif //lightingFlag

#ifdef fogFlag
uniform vec4 u_fogColor;
varying float v_fog;
#endif // fogFlag

void main() {
#if defined(normalFlag)
vec3 normal = v_normal;
#endif // normalFlag

#if defined(diffuseTextureFlag) && defined(diffuseColorFlag) && defined(colorFlag)
vec4 diffuse = texture2D(u_diffuseTexture, v_diffuseUV) * u_diffuseColor * v_color;
#elif defined(diffuseTextureFlag) && defined(diffuseColorFlag)
vec4 diffuse = texture2D(u_diffuseTexture, v_diffuseUV) * u_diffuseColor;
#elif defined(diffuseTextureFlag) && defined(colorFlag)
vec4 diffuse = texture2D(u_diffuseTexture, v_diffuseUV) * v_color;
#elif defined(diffuseTextureFlag)
vec4 diffuse = texture2D(u_diffuseTexture, v_diffuseUV);
#elif defined(diffuseColorFlag) && defined(colorFlag)
vec4 diffuse = u_diffuseColor * v_color;
#elif defined(diffuseColorFlag)
vec4 diffuse = u_diffuseColor;
#elif defined(colorFlag)
vec4 diffuse = v_color;
#else
vec4 diffuse = vec4(1.0);
#endif

#if defined(emissiveTextureFlag) && defined(emissiveColorFlag)
vec4 emissive = texture2D(u_emissiveTexture, v_emissiveUV) * u_emissiveColor;
#elif defined(emissiveTextureFlag)
vec4 emissive = texture2D(u_emissiveTexture, v_emissiveUV);
#elif defined(emissiveColorFlag)
vec4 emissive = u_emissiveColor;
#else
vec4 emissive = vec4(0.0);
#endif

#if (!defined(lightingFlag))
gl_FragColor.rgb = diffuse.rgb + emissive.rgb;
#elif (!defined(specularFlag))
#if defined(ambientFlag) && defined(separateAmbientFlag)
#ifdef shadowMapFlag
gl_FragColor.rgb = (diffuse.rgb * (v_ambientLight + getShadow() * v_lightDiffuse)) + emissive.rgb;
//gl_FragColor.rgb = texture2D(u_shadowTexture, v_shadowMapUv.xy);
#else
gl_FragColor.rgb = (diffuse.rgb * (v_ambientLight + v_lightDiffuse)) + emissive.rgb;
#endif //shadowMapFlag
#else
#ifdef shadowMapFlag
gl_FragColor.rgb = getShadow() * (diffuse.rgb * v_lightDiffuse) + emissive.rgb;
#else
gl_FragColor.rgb = (diffuse.rgb * v_lightDiffuse) + emissive.rgb;
#endif //shadowMapFlag
#endif
#else
#if defined(specularTextureFlag) && defined(specularColorFlag)
vec3 specular = texture2D(u_specularTexture, v_specularUV).rgb * u_specularColor.rgb * v_lightSpecular;
#elif defined(specularTextureFlag)
vec3 specular = texture2D(u_specularTexture, v_specularUV).rgb * v_lightSpecular;
#elif defined(specularColorFlag)
vec3 specular = u_specularColor.rgb * v_lightSpecular;
#else
vec3 specular = v_lightSpecular;
#endif

#if defined(ambientFlag) && defined(separateAmbientFlag)
#ifdef shadowMapFlag
gl_FragColor.rgb = (diffuse.rgb * (getShadow() * v_lightDiffuse + v_ambientLight)) + specular + emissive.rgb;
//gl_FragColor.rgb = texture2D(u_shadowTexture, v_shadowMapUv.xy);
#else
gl_FragColor.rgb = (diffuse.rgb * (v_lightDiffuse + v_ambientLight)) + specular + emissive.rgb;
#endif //shadowMapFlag
#else
#ifdef shadowMapFlag
gl_FragColor.rgb = getShadow() * ((diffuse.rgb * v_lightDiffuse) + specular) + emissive.rgb;
#else
gl_FragColor.rgb = (diffuse.rgb * v_lightDiffuse) + specular + emissive.rgb;
#endif //shadowMapFlag
#endif
#endif //lightingFlag

#ifdef fogFlag
gl_FragColor.rgb = mix(gl_FragColor.rgb, u_fogColor.rgb, v_fog);
#endif // end fogFlag

#ifdef blendedFlag
gl_FragColor.a = diffuse.a * v_opacity;
#ifdef alphaTestFlag
if (gl_FragColor.a <= v_alphaTest)
discard;
#endif
#else
gl_FragColor.a = 1.0;
#endif

}
Loading

0 comments on commit 671a1fa

Please sign in to comment.