add engine logo

This commit is contained in:
Nishi 2026-01-12 02:31:36 +09:00
commit 8fb64454cc
Signed by: nishi
GPG key ID: 27EF69B208EB9343
14 changed files with 113 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View file

@ -0,0 +1,112 @@
#include "colors.inc"
#include "shapes.inc"
#include "skies.inc"
object {
O_Cloud1
}
sky_sphere {
pigment {
gradient y
color_map {
[0.0 White*0.8]
[0.2 rgb<0.2 0.2 0.7>]
}
}
}
plane {
y, 0
pigment {
checker White Red
}
finish {
phong 1.0
reflection 0.3
}
}
camera {
location <0.75 * 1.25, 0.25, -1.5 * 1.25>
look_at <0, 0.5, 0>
angle 35
up <0, 1, 0>
right image_width/image_height*x
}
light_source {
<125, 250, -250>
color White * 2
parallel point_at <0, 0, 0>
}
#macro Gear(NumTeeth, Diameter, Thickness)
#macro Tooth()
prism {
linear_sweep
linear_spline
-1,
1,
7,
<-1, -1.5>,
<-1, 0>,
<-0.5, 1>,
<0.5, 1>,
<1, 0>,
<1, -1.5>,
<-1, -1.5>
rotate -90 * x
scale 0.5
}
#end
union {
union {
#declare T=NumTeeth;
#declare A=0;
#while (A < 360)
object {
Tooth()
translate <0, T / pi, 0>
rotate z * A
}
#declare A = A + 360 / T;
#end
scale 1 / (T / pi)
}
cylinder {
<0, 0, -(1 / (T / pi) / 2)>,
<0, 0, (1 / (T / pi) / 2)>,
1 - (1 / (T / pi) / 2)
}
scale <0.5 * Diameter, 0.5 * Diameter, (T / pi) * 2 * Thickness>
}
#end
object {
difference {
Gear(16, 1, 0.1)
cylinder {
<0, 0, -1>
<0, 0, 1>
0.1
}
}
translate <0, 0.55, 0>
pigment {
color rgb <1, 0, 0>
}
}
object {
text {
ttf "../font/IBMPlexSans-Bold.ttf"
"GearSrc"
1, 0
}
pigment {
color rgb <1, 1, 1>
}
translate <-2, 0, -2>
scale <0.25, 0.25, 0.1>
}

View file

@ -1,74 +0,0 @@
#version 110
varying vec4 vPos;
varying vec3 vNrm;
varying vec4 vShadowCoord;
varying vec4 vColor;
uniform sampler2D depth_texture;
uniform sampler2D current_texture;
uniform float enable_lighting;
vec4 PhongShading(void)
{
vec3 N = normalize(vNrm);
vec3 L = normalize(gl_LightSource[0].position.xyz-vPos.xyz);
vec4 ambient = gl_FrontLightProduct[0].ambient;
float dcoef = max(dot(L, N), 0.0);
vec4 diffuse = gl_FrontLightProduct[0].diffuse * dcoef;
vec4 specular = vec4(0.0);
if(dcoef > 0.0){
vec3 V = normalize(-vPos.xyz);
vec3 R = reflect(-L, N);
float specularLight = pow(max(dot(R, V), 0.0), gl_FrontMaterial.shininess);
specular = gl_FrontLightProduct[0].specular * specularLight;
}
return ambient+diffuse+specular;
}
float ShadowCoef(void){
vec4 shadow_coord = vShadowCoord / vShadowCoord.w;
float view = shadow_coord.z;
vec2 d[4];
float light = 1.0;
float shadow_coef = 1.0;
int i;
d[0] = vec2(-0.94201624, -0.39906216);
d[1] = vec2(0.94558609, -0.76890725);
d[2] = vec2(-0.094184101, -0.92938870);
d[3] = vec2(0.34495938, 0.29387760);
light = texture2D(depth_texture, shadow_coord.xy).z;
for(i = 0; i < 4; i++){
vec2 p = shadow_coord.xy + d[i] / 700.0;
if(p.x < 0.0) continue;
if(p.y < 0.0) continue;
if(p.x > 1.0) continue;
if(p.y > 1.0) continue;
if(texture2D(depth_texture, p).z < view){
shadow_coef -= 0.2;
}
}
return shadow_coef;
}
void main(void){
vec4 c = enable_lighting > 0.5 ? PhongShading() : vColor;
vec4 ambient = gl_LightSource[0].ambient;
float shadow_coef = ShadowCoef();
c = c * texture2D(current_texture, gl_TexCoord[0].st);
gl_FragColor = ambient * shadow_coef * c + (1.0 - ambient) * c;
gl_FragColor.a = 1.0;
}

View file

@ -1,18 +0,0 @@
#version 110
varying vec4 vPos;
varying vec3 vNrm;
varying vec4 vShadowCoord;
varying vec4 vColor;
void main(void){
vPos = gl_ModelViewMatrix * gl_Vertex;
vNrm = normalize(gl_NormalMatrix * gl_Normal);
vShadowCoord = gl_TextureMatrix[7] * gl_ModelViewMatrix * gl_Vertex;
vColor = gl_Color;
gl_Position = gl_ProjectionMatrix * vPos;
gl_FrontColor = gl_Color;
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB