mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Added bindings for mouse clicks, fixed lights
This commit is contained in:
parent
b472626d8d
commit
b6a8358e9e
5 changed files with 13 additions and 7 deletions
|
|
@ -22,7 +22,7 @@ void main(){
|
|||
vec2 pos2d = (u_model * vec4(v_position, 1.0)).xz-u_cameraPos.xz;
|
||||
vec4 modelpos = u_model * vec4(v_position+vec3(0,pow(length(pos2d)*0.0, 3.0),0), 1.0);
|
||||
vec4 viewmodelpos = u_view * modelpos;
|
||||
vec3 light = v_light.rgb * 1.6;
|
||||
vec3 light = v_light.rgb;
|
||||
float torchlight = max(0.0, 1.0-distance(u_cameraPos, modelpos.xyz)/u_torchlightDistance);
|
||||
light += torchlight * u_torchlightColor;
|
||||
a_color = vec4(pow(light, vec3(u_gamma)),1.0f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue