mirror of https://github.com/buggins/dlangui.git
Fix dminer example
This commit is contained in:
parent
2915bece47
commit
7a585654ee
|
@ -197,7 +197,7 @@ struct SmallChunk {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// return chunk position in world (aligned to chunk origin)
|
/// return chunk position in world (aligned to chunk origin)
|
||||||
@property ref const(Vector3d) position() {
|
@property const(Vector3d) position() {
|
||||||
return _pos;
|
return _pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,27 +70,27 @@ out vec4 _fragColor;
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// Varyings
|
// Varyings
|
||||||
#if defined(VERTEX_COLOR)
|
#if defined(VERTEX_COLOR)
|
||||||
varying vec3 v_color;
|
in vec3 v_color;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIGHTMAP)
|
#if defined(LIGHTMAP)
|
||||||
varying vec2 v_texCoord1;
|
in vec2 v_texCoord1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIGHTING)
|
#if defined(LIGHTING)
|
||||||
|
|
||||||
varying vec3 v_normalVector;
|
in vec3 v_normalVector;
|
||||||
|
|
||||||
#if (POINT_LIGHT_COUNT > 0)
|
#if (POINT_LIGHT_COUNT > 0)
|
||||||
varying vec3 v_vertexToPointLightDirection[POINT_LIGHT_COUNT];
|
in vec3 v_vertexToPointLightDirection[POINT_LIGHT_COUNT];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (SPOT_LIGHT_COUNT > 0)
|
#if (SPOT_LIGHT_COUNT > 0)
|
||||||
varying vec3 v_vertexToSpotLightDirection[SPOT_LIGHT_COUNT];
|
in vec3 v_vertexToSpotLightDirection[SPOT_LIGHT_COUNT];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SPECULAR)
|
#if defined(SPECULAR)
|
||||||
varying vec3 v_cameraDirection;
|
in vec3 v_cameraDirection;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "lighting.frag"
|
#include "lighting.frag"
|
||||||
|
@ -98,7 +98,7 @@ varying vec3 v_cameraDirection;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CLIP_PLANE)
|
#if defined(CLIP_PLANE)
|
||||||
varying float v_clipDistance;
|
in float v_clipDistance;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
|
|
|
@ -13,23 +13,23 @@
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// Attributes
|
// Attributes
|
||||||
attribute vec4 a_position;
|
in vec4 a_position;
|
||||||
|
|
||||||
#if defined(SKINNING)
|
#if defined(SKINNING)
|
||||||
attribute vec4 a_blendWeights;
|
in vec4 a_blendWeights;
|
||||||
attribute vec4 a_blendIndices;
|
in vec4 a_blendIndices;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIGHTMAP)
|
#if defined(LIGHTMAP)
|
||||||
attribute vec2 a_texCoord1;
|
in vec2 a_texCoord1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIGHTING)
|
#if defined(LIGHTING)
|
||||||
attribute vec3 a_normal;
|
in vec3 a_normal;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(VERTEX_COLOR)
|
#if defined(VERTEX_COLOR)
|
||||||
attribute vec3 a_color;
|
in vec3 a_color;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
@ -74,31 +74,31 @@ uniform vec4 u_clipPlane;
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// Varyings
|
// Varyings
|
||||||
#if defined(LIGHTMAP)
|
#if defined(LIGHTMAP)
|
||||||
varying vec2 v_texCoord1;
|
out vec2 v_texCoord1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(VERTEX_COLOR)
|
#if defined(VERTEX_COLOR)
|
||||||
varying vec3 v_color;
|
out vec3 v_color;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIGHTING)
|
#if defined(LIGHTING)
|
||||||
|
|
||||||
varying vec3 v_normalVector;
|
out vec3 v_normalVector;
|
||||||
|
|
||||||
#if (DIRECTIONAL_LIGHT_COUNT > 0)
|
#if (DIRECTIONAL_LIGHT_COUNT > 0)
|
||||||
varying vec3 v_lightDirection[DIRECTIONAL_LIGHT_COUNT];
|
out vec3 v_lightDirection[DIRECTIONAL_LIGHT_COUNT];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (POINT_LIGHT_COUNT > 0)
|
#if (POINT_LIGHT_COUNT > 0)
|
||||||
varying vec3 v_vertexToPointLightDirection[POINT_LIGHT_COUNT];
|
out vec3 v_vertexToPointLightDirection[POINT_LIGHT_COUNT];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (SPOT_LIGHT_COUNT > 0)
|
#if (SPOT_LIGHT_COUNT > 0)
|
||||||
varying vec3 v_vertexToSpotLightDirection[SPOT_LIGHT_COUNT];
|
out vec3 v_vertexToSpotLightDirection[SPOT_LIGHT_COUNT];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SPECULAR)
|
#if defined(SPECULAR)
|
||||||
varying vec3 v_cameraDirection;
|
out vec3 v_cameraDirection;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "lighting.vert"
|
#include "lighting.vert"
|
||||||
|
@ -112,7 +112,7 @@ varying vec3 v_cameraDirection;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CLIP_PLANE)
|
#if defined(CLIP_PLANE)
|
||||||
varying float v_clipDistance;
|
out float v_clipDistance;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
|
|
|
@ -84,35 +84,35 @@ vec4 _baseColor;
|
||||||
out vec4 _fragColor;
|
out vec4 _fragColor;
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// Varyings
|
// Varyings
|
||||||
varying vec2 v_texCoord;
|
in vec2 v_texCoord;
|
||||||
|
|
||||||
#if defined(LIGHTMAP)
|
#if defined(LIGHTMAP)
|
||||||
varying vec2 v_texCoord1;
|
in vec2 v_texCoord1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIGHTING)
|
#if defined(LIGHTING)
|
||||||
|
|
||||||
#if !defined(BUMPED)
|
#if !defined(BUMPED)
|
||||||
varying vec3 v_normalVector;
|
in vec3 v_normalVector;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(BUMPED) && (DIRECTIONAL_LIGHT_COUNT > 0)
|
#if defined(BUMPED) && (DIRECTIONAL_LIGHT_COUNT > 0)
|
||||||
varying vec3 v_directionalLightDirection[DIRECTIONAL_LIGHT_COUNT];
|
in vec3 v_directionalLightDirection[DIRECTIONAL_LIGHT_COUNT];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (POINT_LIGHT_COUNT > 0)
|
#if (POINT_LIGHT_COUNT > 0)
|
||||||
varying vec3 v_vertexToPointLightDirection[POINT_LIGHT_COUNT];
|
in vec3 v_vertexToPointLightDirection[POINT_LIGHT_COUNT];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (SPOT_LIGHT_COUNT > 0)
|
#if (SPOT_LIGHT_COUNT > 0)
|
||||||
varying vec3 v_vertexToSpotLightDirection[SPOT_LIGHT_COUNT];
|
in vec3 v_vertexToSpotLightDirection[SPOT_LIGHT_COUNT];
|
||||||
#if defined(BUMPED)
|
#if defined(BUMPED)
|
||||||
varying vec3 v_spotLightDirection[SPOT_LIGHT_COUNT];
|
in vec3 v_spotLightDirection[SPOT_LIGHT_COUNT];
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SPECULAR)
|
#if defined(SPECULAR)
|
||||||
varying vec3 v_cameraDirection;
|
in vec3 v_cameraDirection;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "lighting.frag"
|
#include "lighting.frag"
|
||||||
|
@ -120,11 +120,11 @@ varying vec3 v_cameraDirection;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CLIP_PLANE)
|
#if defined(CLIP_PLANE)
|
||||||
varying float v_clipDistance;
|
in float v_clipDistance;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(FOG)
|
#if defined(FOG)
|
||||||
varying vec4 viewSpace;
|
in vec4 viewSpace;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
|
|
|
@ -13,25 +13,25 @@
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// Atributes
|
// Atributes
|
||||||
attribute vec4 a_position;
|
in vec4 a_position;
|
||||||
|
|
||||||
#if defined(SKINNING)
|
#if defined(SKINNING)
|
||||||
attribute vec4 a_blendWeights;
|
in vec4 a_blendWeights;
|
||||||
attribute vec4 a_blendIndices;
|
in vec4 a_blendIndices;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
attribute vec2 a_texCoord;
|
in vec2 a_texCoord;
|
||||||
|
|
||||||
#if defined(LIGHTMAP)
|
#if defined(LIGHTMAP)
|
||||||
attribute vec2 a_texCoord1;
|
in vec2 a_texCoord1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIGHTING)
|
#if defined(LIGHTING)
|
||||||
attribute vec3 a_normal;
|
in vec3 a_normal;
|
||||||
|
|
||||||
#if defined(BUMPED)
|
#if defined(BUMPED)
|
||||||
attribute vec3 a_tangent;
|
in vec3 a_tangent;
|
||||||
attribute vec3 a_binormal;
|
in vec3 a_binormal;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -92,35 +92,35 @@ uniform vec4 u_clipPlane;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// Varyings
|
// Varyings
|
||||||
varying vec2 v_texCoord;
|
out vec2 v_texCoord;
|
||||||
|
|
||||||
#if defined(LIGHTMAP)
|
#if defined(LIGHTMAP)
|
||||||
varying vec2 v_texCoord1;
|
out vec2 v_texCoord1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIGHTING)
|
#if defined(LIGHTING)
|
||||||
|
|
||||||
#if !defined(BUMPED)
|
#if !defined(BUMPED)
|
||||||
varying vec3 v_normalVector;
|
out vec3 v_normalVector;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(BUMPED) && (DIRECTIONAL_LIGHT_COUNT > 0)
|
#if defined(BUMPED) && (DIRECTIONAL_LIGHT_COUNT > 0)
|
||||||
varying vec3 v_directionalLightDirection[DIRECTIONAL_LIGHT_COUNT];
|
out vec3 v_directionalLightDirection[DIRECTIONAL_LIGHT_COUNT];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (POINT_LIGHT_COUNT > 0)
|
#if (POINT_LIGHT_COUNT > 0)
|
||||||
varying vec3 v_vertexToPointLightDirection[POINT_LIGHT_COUNT];
|
out vec3 v_vertexToPointLightDirection[POINT_LIGHT_COUNT];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (SPOT_LIGHT_COUNT > 0)
|
#if (SPOT_LIGHT_COUNT > 0)
|
||||||
varying vec3 v_vertexToSpotLightDirection[SPOT_LIGHT_COUNT];
|
out vec3 v_vertexToSpotLightDirection[SPOT_LIGHT_COUNT];
|
||||||
#if defined(BUMPED)
|
#if defined(BUMPED)
|
||||||
varying vec3 v_spotLightDirection[SPOT_LIGHT_COUNT];
|
out vec3 v_spotLightDirection[SPOT_LIGHT_COUNT];
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SPECULAR)
|
#if defined(SPECULAR)
|
||||||
varying vec3 v_cameraDirection;
|
out vec3 v_cameraDirection;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "lighting.vert"
|
#include "lighting.vert"
|
||||||
|
@ -134,11 +134,11 @@ varying vec3 v_cameraDirection;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CLIP_PLANE)
|
#if defined(CLIP_PLANE)
|
||||||
varying float v_clipDistance;
|
out float v_clipDistance;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(FOG)
|
#if defined(FOG)
|
||||||
varying vec4 viewSpace;
|
out vec4 viewSpace;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
|
|
Loading…
Reference in New Issue