Player base emissive lights on Serpulo (WIP)
This commit is contained in:
@@ -23,7 +23,6 @@ void main(){
|
||||
vec3 vertexEye = normalize(u_campos - (u_trans * a_position).xyz);
|
||||
|
||||
float albedo = 1.0 - a_color.a;
|
||||
float emissive = a_emissive.a * u_emissive;
|
||||
|
||||
float specularFactor = dot(vertexEye, lightReflect);
|
||||
if(specularFactor > 0.0){
|
||||
@@ -32,6 +31,8 @@ void main(){
|
||||
|
||||
vec3 norc = (u_ambientColor + specular) * (diffuse + vec3(clamp((dot(a_normal, u_lightdir) + 1.0) / 2.0, 0.0, 1.0)));
|
||||
|
||||
v_col = vec4(mix(a_color.rgb, a_emissive.rgb, vec3(1.0 - norc)), 1.0) * vec4(mix(norc, vec3(1.0), emissive), 1.0);
|
||||
float emissive = a_emissive.a * u_emissive * min(pow(max(0.0, (1.0 - norc.r) * 1.2), 3.0), 1.1);
|
||||
|
||||
v_col = vec4(mix(a_color.rgb, a_emissive.rgb, emissive), 1.0) * vec4(mix(norc, vec3(1.0), emissive), 1.0);
|
||||
gl_Position = u_proj * u_trans * a_position;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user