main
Dominik Madarász 2023-12-04 09:10:39 +01:00
parent 67f60ac798
commit 4688b154e5
7 changed files with 16 additions and 11 deletions

View File

@ -343,6 +343,8 @@ if "%1"=="gwk" (
copy/y ..\fwk-mirror\engine\fwk.c _fwk\engine\fwk.c
copy/y ..\fwk-mirror\engine\fwk _fwk\engine\fwk
copy/y ..\fwk-mirror\engine\split\*.inl _fwk\engine\split\
copy/y ..\fwk-mirror\engine\art\shaders\* _fwk\engine\art\shaders\
copy/y ..\fwk-mirror\tools\*.c _fwk\tools\
rem copy/y ..\fwk-mirror\engine\split\3rd_*.c _fwk\engine\split\
call MAKE.bat back

View File

@ -9,7 +9,7 @@ uniform vec4 u_diffuse = vec4(1.0,1.0,1.0,1.0);
// lightmapping
uniform sampler2D u_lightmap;
uniform bool u_texlit;
uniform bool u_texmod = false;
uniform bool u_texmod = true;
uniform float u_litboost = 1.0;
in vec3 v_position;
@ -157,7 +157,7 @@ void main() {
vec4 lit = vec4(1.0, 1.0, 1.0, 1.0);
// SH lighting
/* if (!u_texlit) */ {
if (!u_texlit) {
vec3 result = sh_lighting(n);
if( (result.x*result.x+result.y*result.y+result.z*result.z) > 0.0 ) lit = vec4(result, 1.0);
}
@ -178,13 +178,15 @@ void main() {
}
if (u_texlit) {
vec4 litsample = texture(u_lightmap, v_texcoord2);
vec4 litsample = texture(u_lightmap, v_texcoord);
if (u_texmod) {
diffuse.rgb *= litsample.rgb;
diffuse *= litsample;
} else {
diffuse.rgb += litsample.rgb;
diffuse += litsample;
}
diffuse.rgb += sh_lighting(n);
}
// lighting mix

View File

@ -0,0 +1 @@
#version 150

View File

@ -56,8 +56,8 @@ in vec4 att_indexes; // @fixme: gles might use ivec4 instead?
in vec4 att_weights; // @todo: downgrade from float to byte
in float att_vertexindex; // for blendshapes
in vec4 att_color;
in vec2 att_texcoord2;
in vec3 att_bitangent; // @todo: remove? also, ass2iqe might output this
in vec2 att_texcoord2;
out vec4 v_color;
out vec3 v_position, v_position_ws;
out vec3 v_normal, v_normal_ws;