Refactor mesh handling to use templated vertex structures for improved type safety and flexibility
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
layout (location = 0) in vec3 v_position;
|
||||
layout (location = 1) in vec2 v_texCoord;
|
||||
layout (location = 2) in vec3 v_color;
|
||||
layout (location = 3) in float v_light;
|
||||
layout (location = 3) in vec4 v_light;
|
||||
|
||||
out vec4 a_color;
|
||||
out vec2 a_texCoord;
|
||||
@@ -31,7 +31,7 @@ void main() {
|
||||
vec3 pos3d = modelpos.xyz - u_cameraPos;
|
||||
modelpos.xyz = apply_planet_curvature(modelpos.xyz, pos3d);
|
||||
|
||||
vec4 decomp_light = decompress_light(v_light);
|
||||
vec4 decomp_light = v_light;
|
||||
vec3 light = decomp_light.rgb;
|
||||
float torchlight = max(0.0, 1.0-distance(u_cameraPos, modelpos.xyz) /
|
||||
u_torchlightDistance);
|
||||
|
||||
Reference in New Issue
Block a user