This commit is contained in:
Nishi 2026-01-12 01:03:18 +09:00
commit 57685ed075
Signed by: nishi
GPG key ID: 27EF69B208EB9343
20 changed files with 282 additions and 13 deletions

View file

@ -3,6 +3,7 @@
varying vec4 vPos;
varying vec3 vNrm;
varying vec4 vShadowCoord;
varying vec4 vColor;
uniform sampler2D depth_texture;
uniform sampler2D current_texture;
@ -62,11 +63,11 @@ float ShadowCoef(void){
}
void main(void){
vec4 c = enable_lighting > 0.5 ? PhongShading() : gl_Color;
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);
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

@ -3,12 +3,15 @@
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.

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB