mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 06:51:51 +00:00
add entity shader
This commit is contained in:
parent
8e159009eb
commit
4197746c69
8 changed files with 83 additions and 16 deletions
|
|
@ -3,9 +3,6 @@
|
|||
|
||||
#include <constants>
|
||||
|
||||
#define PI 3.1415926535897932384626433832795
|
||||
#define PI2 (PI*2)
|
||||
|
||||
vec4 decompress_light(float compressed_light) {
|
||||
vec4 result;
|
||||
int compressed = floatBitsToInt(compressed_light);
|
||||
|
|
@ -24,4 +21,9 @@ vec3 pick_sky_color(samplerCube cubemap) {
|
|||
return skyLightColor;
|
||||
}
|
||||
|
||||
vec3 apply_planet_curvature(vec3 modelPos, vec3 pos3d) {
|
||||
modelPos.y -= pow(length(pos3d.xz)*CURVATURE_FACTOR, 3.0);
|
||||
return modelPos;
|
||||
}
|
||||
|
||||
#endif // COMMONS_GLSL_
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#ifndef CONSTANTS_GLSL_
|
||||
#define CONSTANTS_GLSL_
|
||||
|
||||
#define PI 3.1415926535897932384626433832795
|
||||
#define PI2 (PI*2)
|
||||
|
||||
// geometry
|
||||
#define CURVATURE_FACTOR 0.002
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue