add more demos

main
Dominik Madarász 2023-08-11 01:15:15 +02:00
parent 0a87150932
commit 7f5f6e7a58
7 changed files with 99 additions and 110 deletions

View File

@ -555,7 +555,7 @@ set rc=0
if "%1"=="nov4k" set "v4k=no" && goto loop if "%1"=="nov4k" set "v4k=no" && goto loop
if "%1"=="nodemos" set "demos=no" && goto loop if "%1"=="nodemos" set "demos=no" && goto loop
if "%1"=="demos" set "demos=yes" && set "hello=no" && goto loop if "%1"=="demos" set "demos=yes" && set "hello=no" && goto loop
if "%1"=="extras" set "extras=yes" && set "demos=yes" && set "hello=no" && goto loop if "%1"=="extras" set "extras=yes" && set "hello=no" && goto loop
if "%1"=="noeditor" set "editor=no" && goto loop if "%1"=="noeditor" set "editor=no" && goto loop
if "%1"=="hello" set "hello=yes" && goto loop if "%1"=="hello" set "hello=yes" && goto loop
if "%1"=="editor" set "editor=yes" && set "hello=no"&& goto loop if "%1"=="editor" set "editor=yes" && set "hello=no"&& goto loop
@ -768,8 +768,10 @@ if "!demos!"=="yes" (
!echo! 00-ui && !cc! !o! 00-ui.exe demos\00-ui.c !import! !args! || set rc=1 !echo! 00-ui && !cc! !o! 00-ui.exe demos\00-ui.c !import! !args! || set rc=1
!echo! 01-sprite && !cc! !o! 01-sprite.exe demos\01-sprite.c !import! !args! || set rc=1 !echo! 01-sprite && !cc! !o! 01-sprite.exe demos\01-sprite.c !import! !args! || set rc=1
!echo! 02-ddraw && !cc! !o! 02-ddraw.exe demos\02-ddraw.c !import! !args! || set rc=1 !echo! 02-ddraw && !cc! !o! 02-ddraw.exe demos\02-ddraw.c !import! !args! || set rc=1
!echo! 02-frustum && !cc! !o! 02-frustum.exe demos\02-frustum.c !import! !args! || set rc=1
!echo! 03-anims && !cc! !o! 03-anims.exe demos\03-anims.c !import! !args! || set rc=1 !echo! 03-anims && !cc! !o! 03-anims.exe demos\03-anims.c !import! !args! || set rc=1
!echo! 04-actor && !cc! !o! 04-actor.exe demos\04-actor.c !import! !args! || set rc=1 !echo! 04-actor && !cc! !o! 04-actor.exe demos\04-actor.c !import! !args! || set rc=1
!echo! 04-lod && !cc! !o! 04-lod.exe demos\04-lod.c !import! !args! || set rc=1
!echo! 05-scene && !cc! !o! 05-scene.exe demos\05-scene.c !import! !args! || set rc=1 !echo! 05-scene && !cc! !o! 05-scene.exe demos\05-scene.c !import! !args! || set rc=1
!echo! 06-controller && !cc! !o! 06-controller.exe demos\06-controller.c !import! !args! || set rc=1 !echo! 06-controller && !cc! !o! 06-controller.exe demos\06-controller.c !import! !args! || set rc=1
!echo! 07-network && !cc! !o! 07-network.exe demos\07-network.c !import! !args! || set rc=1 !echo! 07-network && !cc! !o! 07-network.exe demos\07-network.c !import! !args! || set rc=1

View File

@ -339063,10 +339063,6 @@ void network_rpc_send(unsigned id, const char *cmdline) {
#line 1 "v4k_shaders.c" #line 1 "v4k_shaders.c"
static const char *const fs_0_0_shadowmap_lit = "//" FILELINE "\n" static const char *const fs_0_0_shadowmap_lit = "//" FILELINE "\n"
"// #version 140 // inverse() requires v140\n"
"// FILELINE\n"
"\n"
"\n"
"// uniform mat4 view = mat4(1.0);\n" "// uniform mat4 view = mat4(1.0);\n"
"uniform vec3 lightPos = vec3(1.0);\n" "uniform vec3 lightPos = vec3(1.0);\n"
"uniform float doTexture = 1.;\n" "uniform float doTexture = 1.;\n"
@ -339674,31 +339670,32 @@ static const char *const vs_323444143_16_332_model = "//" FILELINE "\n"
" if(!SKINNED) {\n" " if(!SKINNED) {\n"
" objPos = att_position;\n" " objPos = att_position;\n"
" v_normal = att_normal;\n" " v_normal = att_normal;\n"
" } else {\n" " } else {\n"
" mat3x4 m = vsBoneMatrix[int(att_indexes.x)] * att_weights.x;\n" " mat3x4 m = vsBoneMatrix[int(att_indexes.x)] * att_weights.x;\n"
" m += vsBoneMatrix[int(att_indexes.y)] * att_weights.y;\n" " m += vsBoneMatrix[int(att_indexes.y)] * att_weights.y;\n"
" m += vsBoneMatrix[int(att_indexes.z)] * att_weights.z;\n" " m += vsBoneMatrix[int(att_indexes.z)] * att_weights.z;\n"
" m += vsBoneMatrix[int(att_indexes.w)] * att_weights.w;\n" " m += vsBoneMatrix[int(att_indexes.w)] * att_weights.w;\n"
" objPos = vec4(att_position, 1.0) * m;\n" " objPos = vec4(att_position, 1.0) * m;\n"
" \n"
" // blendshapes\n"
" // objPos += evaluate_blend_shape(int(att_vertexindex));\n"
" \n"
" v_normal = vec4(att_normal, 0.0) * m;\n"
" //@todo: tangents\n"
" }\n"
" \n" " \n"
" // vec3 tangent = att_tangent.xyz;\n" " // blendshapes\n"
" // vec3 bitangent = cross(att_normal, att_tangent.xyz) * att_tangent.w;\n" " // objPos += evaluate_blend_shape(int(att_vertexindex));\n"
" \n" " \n"
" v_normal_ws = normalize(vec3(model * vec4(v_normal, 0.))); // normal to world/model space\n" " v_normal = vec4(att_normal, 0.0) * m;\n"
" v_normal = normalize(v_normal);\n" " //@todo: tangents\n"
" v_position = att_position;\n" " }\n"
" v_texcoord = att_texcoord;\n" " \n"
" v_color = att_color;\n" " // vec3 tangent = att_tangent.xyz;\n"
" gl_Position = VP * att_instanced_matrix * vec4( objPos, 1.0 );\n" " // vec3 bitangent = cross(att_normal, att_tangent.xyz) * att_tangent.w;\n"
" do_shadow();\n" " \n"
" }\n"; " v_normal_ws = normalize(vec3(model * vec4(v_normal, 0.))); // normal to world/model space\n"
" v_normal = normalize(v_normal);\n"
" v_position = att_position;\n"
" v_texcoord = att_texcoord;\n"
" v_color = att_color;\n"
" gl_Position = VP * att_instanced_matrix * vec4( objPos, 1.0 );\n"
" do_shadow();\n"
"}\n"
"\n";
static const char *const vs_324_24_sprite = "//" FILELINE "\n" static const char *const vs_324_24_sprite = "//" FILELINE "\n"
"uniform mat4 u_mvp;\n" "uniform mat4 u_mvp;\n"

View File

@ -1,7 +1,3 @@
// #version 140 // inverse() requires v140
// FILELINE
// uniform mat4 view = mat4(1.0); // uniform mat4 view = mat4(1.0);
uniform vec3 lightPos = vec3(1.0); uniform vec3 lightPos = vec3(1.0);
uniform float doTexture = 1.; uniform float doTexture = 1.;

View File

@ -87,28 +87,28 @@ void main() {
if(!SKINNED) { if(!SKINNED) {
objPos = att_position; objPos = att_position;
v_normal = att_normal; v_normal = att_normal;
} else { } else {
mat3x4 m = vsBoneMatrix[int(att_indexes.x)] * att_weights.x; mat3x4 m = vsBoneMatrix[int(att_indexes.x)] * att_weights.x;
m += vsBoneMatrix[int(att_indexes.y)] * att_weights.y; m += vsBoneMatrix[int(att_indexes.y)] * att_weights.y;
m += vsBoneMatrix[int(att_indexes.z)] * att_weights.z; m += vsBoneMatrix[int(att_indexes.z)] * att_weights.z;
m += vsBoneMatrix[int(att_indexes.w)] * att_weights.w; m += vsBoneMatrix[int(att_indexes.w)] * att_weights.w;
objPos = vec4(att_position, 1.0) * m; objPos = vec4(att_position, 1.0) * m;
// blendshapes
// objPos += evaluate_blend_shape(int(att_vertexindex));
v_normal = vec4(att_normal, 0.0) * m;
//@todo: tangents
}
// vec3 tangent = att_tangent.xyz; // blendshapes
// vec3 bitangent = cross(att_normal, att_tangent.xyz) * att_tangent.w; // objPos += evaluate_blend_shape(int(att_vertexindex));
v_normal_ws = normalize(vec3(model * vec4(v_normal, 0.))); // normal to world/model space v_normal = vec4(att_normal, 0.0) * m;
v_normal = normalize(v_normal); //@todo: tangents
v_position = att_position; }
v_texcoord = att_texcoord;
v_color = att_color; // vec3 tangent = att_tangent.xyz;
gl_Position = VP * att_instanced_matrix * vec4( objPos, 1.0 ); // vec3 bitangent = cross(att_normal, att_tangent.xyz) * att_tangent.w;
do_shadow();
} v_normal_ws = normalize(vec3(model * vec4(v_normal, 0.))); // normal to world/model space
v_normal = normalize(v_normal);
v_position = att_position;
v_texcoord = att_texcoord;
v_color = att_color;
gl_Position = VP * att_instanced_matrix * vec4( objPos, 1.0 );
do_shadow();
}

View File

@ -1,8 +1,4 @@
static const char *const fs_0_0_shadowmap_lit = "//" FILELINE "\n" static const char *const fs_0_0_shadowmap_lit = "//" FILELINE "\n"
"// #version 140 // inverse() requires v140\n"
"// FILELINE\n"
"\n"
"\n"
"// uniform mat4 view = mat4(1.0);\n" "// uniform mat4 view = mat4(1.0);\n"
"uniform vec3 lightPos = vec3(1.0);\n" "uniform vec3 lightPos = vec3(1.0);\n"
"uniform float doTexture = 1.;\n" "uniform float doTexture = 1.;\n"
@ -610,31 +606,32 @@ static const char *const vs_323444143_16_332_model = "//" FILELINE "\n"
" if(!SKINNED) {\n" " if(!SKINNED) {\n"
" objPos = att_position;\n" " objPos = att_position;\n"
" v_normal = att_normal;\n" " v_normal = att_normal;\n"
" } else {\n" " } else {\n"
" mat3x4 m = vsBoneMatrix[int(att_indexes.x)] * att_weights.x;\n" " mat3x4 m = vsBoneMatrix[int(att_indexes.x)] * att_weights.x;\n"
" m += vsBoneMatrix[int(att_indexes.y)] * att_weights.y;\n" " m += vsBoneMatrix[int(att_indexes.y)] * att_weights.y;\n"
" m += vsBoneMatrix[int(att_indexes.z)] * att_weights.z;\n" " m += vsBoneMatrix[int(att_indexes.z)] * att_weights.z;\n"
" m += vsBoneMatrix[int(att_indexes.w)] * att_weights.w;\n" " m += vsBoneMatrix[int(att_indexes.w)] * att_weights.w;\n"
" objPos = vec4(att_position, 1.0) * m;\n" " objPos = vec4(att_position, 1.0) * m;\n"
" \n"
" // blendshapes\n"
" // objPos += evaluate_blend_shape(int(att_vertexindex));\n"
" \n"
" v_normal = vec4(att_normal, 0.0) * m;\n"
" //@todo: tangents\n"
" }\n"
" \n" " \n"
" // vec3 tangent = att_tangent.xyz;\n" " // blendshapes\n"
" // vec3 bitangent = cross(att_normal, att_tangent.xyz) * att_tangent.w;\n" " // objPos += evaluate_blend_shape(int(att_vertexindex));\n"
" \n" " \n"
" v_normal_ws = normalize(vec3(model * vec4(v_normal, 0.))); // normal to world/model space\n" " v_normal = vec4(att_normal, 0.0) * m;\n"
" v_normal = normalize(v_normal);\n" " //@todo: tangents\n"
" v_position = att_position;\n" " }\n"
" v_texcoord = att_texcoord;\n" " \n"
" v_color = att_color;\n" " // vec3 tangent = att_tangent.xyz;\n"
" gl_Position = VP * att_instanced_matrix * vec4( objPos, 1.0 );\n" " // vec3 bitangent = cross(att_normal, att_tangent.xyz) * att_tangent.w;\n"
" do_shadow();\n" " \n"
" }\n"; " v_normal_ws = normalize(vec3(model * vec4(v_normal, 0.))); // normal to world/model space\n"
" v_normal = normalize(v_normal);\n"
" v_position = att_position;\n"
" v_texcoord = att_texcoord;\n"
" v_color = att_color;\n"
" gl_Position = VP * att_instanced_matrix * vec4( objPos, 1.0 );\n"
" do_shadow();\n"
"}\n"
"\n";
static const char *const vs_324_24_sprite = "//" FILELINE "\n" static const char *const vs_324_24_sprite = "//" FILELINE "\n"
"uniform mat4 u_mvp;\n" "uniform mat4 u_mvp;\n"

View File

@ -10138,10 +10138,6 @@ void network_rpc_send(unsigned id, const char *cmdline) {
#line 1 "v4k_shaders.c" #line 1 "v4k_shaders.c"
static const char *const fs_0_0_shadowmap_lit = "//" FILELINE "\n" static const char *const fs_0_0_shadowmap_lit = "//" FILELINE "\n"
"// #version 140 // inverse() requires v140\n"
"// FILELINE\n"
"\n"
"\n"
"// uniform mat4 view = mat4(1.0);\n" "// uniform mat4 view = mat4(1.0);\n"
"uniform vec3 lightPos = vec3(1.0);\n" "uniform vec3 lightPos = vec3(1.0);\n"
"uniform float doTexture = 1.;\n" "uniform float doTexture = 1.;\n"
@ -10749,31 +10745,32 @@ static const char *const vs_323444143_16_332_model = "//" FILELINE "\n"
" if(!SKINNED) {\n" " if(!SKINNED) {\n"
" objPos = att_position;\n" " objPos = att_position;\n"
" v_normal = att_normal;\n" " v_normal = att_normal;\n"
" } else {\n" " } else {\n"
" mat3x4 m = vsBoneMatrix[int(att_indexes.x)] * att_weights.x;\n" " mat3x4 m = vsBoneMatrix[int(att_indexes.x)] * att_weights.x;\n"
" m += vsBoneMatrix[int(att_indexes.y)] * att_weights.y;\n" " m += vsBoneMatrix[int(att_indexes.y)] * att_weights.y;\n"
" m += vsBoneMatrix[int(att_indexes.z)] * att_weights.z;\n" " m += vsBoneMatrix[int(att_indexes.z)] * att_weights.z;\n"
" m += vsBoneMatrix[int(att_indexes.w)] * att_weights.w;\n" " m += vsBoneMatrix[int(att_indexes.w)] * att_weights.w;\n"
" objPos = vec4(att_position, 1.0) * m;\n" " objPos = vec4(att_position, 1.0) * m;\n"
" \n"
" // blendshapes\n"
" // objPos += evaluate_blend_shape(int(att_vertexindex));\n"
" \n"
" v_normal = vec4(att_normal, 0.0) * m;\n"
" //@todo: tangents\n"
" }\n"
" \n" " \n"
" // vec3 tangent = att_tangent.xyz;\n" " // blendshapes\n"
" // vec3 bitangent = cross(att_normal, att_tangent.xyz) * att_tangent.w;\n" " // objPos += evaluate_blend_shape(int(att_vertexindex));\n"
" \n" " \n"
" v_normal_ws = normalize(vec3(model * vec4(v_normal, 0.))); // normal to world/model space\n" " v_normal = vec4(att_normal, 0.0) * m;\n"
" v_normal = normalize(v_normal);\n" " //@todo: tangents\n"
" v_position = att_position;\n" " }\n"
" v_texcoord = att_texcoord;\n" " \n"
" v_color = att_color;\n" " // vec3 tangent = att_tangent.xyz;\n"
" gl_Position = VP * att_instanced_matrix * vec4( objPos, 1.0 );\n" " // vec3 bitangent = cross(att_normal, att_tangent.xyz) * att_tangent.w;\n"
" do_shadow();\n" " \n"
" }\n"; " v_normal_ws = normalize(vec3(model * vec4(v_normal, 0.))); // normal to world/model space\n"
" v_normal = normalize(v_normal);\n"
" v_position = att_position;\n"
" v_texcoord = att_texcoord;\n"
" v_color = att_color;\n"
" gl_Position = VP * att_instanced_matrix * vec4( objPos, 1.0 );\n"
" do_shadow();\n"
"}\n"
"\n";
static const char *const vs_324_24_sprite = "//" FILELINE "\n" static const char *const vs_324_24_sprite = "//" FILELINE "\n"
"uniform mat4 u_mvp;\n" "uniform mat4 u_mvp;\n"

View File

@ -596,7 +596,7 @@ details > summary::-webkit-details-marker {
|Version: | 2023.7 | |Version: | 2023.7 |
|:--------------|:------------| |:--------------|:------------|
|Branch: | main | |Branch: | main |
|Commit: | 22 | |Commit: | 24 |
<!--| Documentation last modified | { {LAST_MODIFIED} } |--> <!--| Documentation last modified | { {LAST_MODIFIED} } |-->
# [V·4·K 2023.7 ](https://dev.v4.games/zaklaus/v4k) # [V·4·K 2023.7 ](https://dev.v4.games/zaklaus/v4k)