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)
|
||||
@property ref const(Vector3d) position() {
|
||||
@property const(Vector3d) position() {
|
||||
return _pos;
|
||||
}
|
||||
|
||||
|
|
|
@ -70,27 +70,27 @@ out vec4 _fragColor;
|
|||
///////////////////////////////////////////////////////////
|
||||
// Varyings
|
||||
#if defined(VERTEX_COLOR)
|
||||
varying vec3 v_color;
|
||||
in vec3 v_color;
|
||||
#endif
|
||||
|
||||
#if defined(LIGHTMAP)
|
||||
varying vec2 v_texCoord1;
|
||||
in vec2 v_texCoord1;
|
||||
#endif
|
||||
|
||||
#if defined(LIGHTING)
|
||||
|
||||
varying vec3 v_normalVector;
|
||||
in vec3 v_normalVector;
|
||||
|
||||
#if (POINT_LIGHT_COUNT > 0)
|
||||
varying vec3 v_vertexToPointLightDirection[POINT_LIGHT_COUNT];
|
||||
in vec3 v_vertexToPointLightDirection[POINT_LIGHT_COUNT];
|
||||
#endif
|
||||
|
||||
#if (SPOT_LIGHT_COUNT > 0)
|
||||
varying vec3 v_vertexToSpotLightDirection[SPOT_LIGHT_COUNT];
|
||||
in vec3 v_vertexToSpotLightDirection[SPOT_LIGHT_COUNT];
|
||||
#endif
|
||||
|
||||
#if defined(SPECULAR)
|
||||
varying vec3 v_cameraDirection;
|
||||
in vec3 v_cameraDirection;
|
||||
#endif
|
||||
|
||||
#include "lighting.frag"
|
||||
|
@ -98,7 +98,7 @@ varying vec3 v_cameraDirection;
|
|||
#endif
|
||||
|
||||
#if defined(CLIP_PLANE)
|
||||
varying float v_clipDistance;
|
||||
in float v_clipDistance;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
|
|
|
@ -13,23 +13,23 @@
|
|||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Attributes
|
||||
attribute vec4 a_position;
|
||||
in vec4 a_position;
|
||||
|
||||
#if defined(SKINNING)
|
||||
attribute vec4 a_blendWeights;
|
||||
attribute vec4 a_blendIndices;
|
||||
in vec4 a_blendWeights;
|
||||
in vec4 a_blendIndices;
|
||||
#endif
|
||||
|
||||
#if defined(LIGHTMAP)
|
||||
attribute vec2 a_texCoord1;
|
||||
in vec2 a_texCoord1;
|
||||
#endif
|
||||
|
||||
#if defined(LIGHTING)
|
||||
attribute vec3 a_normal;
|
||||
in vec3 a_normal;
|
||||
#endif
|
||||
|
||||
#if defined(VERTEX_COLOR)
|
||||
attribute vec3 a_color;
|
||||
in vec3 a_color;
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
|
@ -74,31 +74,31 @@ uniform vec4 u_clipPlane;
|
|||
///////////////////////////////////////////////////////////
|
||||
// Varyings
|
||||
#if defined(LIGHTMAP)
|
||||
varying vec2 v_texCoord1;
|
||||
out vec2 v_texCoord1;
|
||||
#endif
|
||||
|
||||
#if defined(VERTEX_COLOR)
|
||||
varying vec3 v_color;
|
||||
out vec3 v_color;
|
||||
#endif
|
||||
|
||||
#if defined(LIGHTING)
|
||||
|
||||
varying vec3 v_normalVector;
|
||||
out vec3 v_normalVector;
|
||||
|
||||
#if (DIRECTIONAL_LIGHT_COUNT > 0)
|
||||
varying vec3 v_lightDirection[DIRECTIONAL_LIGHT_COUNT];
|
||||
out vec3 v_lightDirection[DIRECTIONAL_LIGHT_COUNT];
|
||||
#endif
|
||||
|
||||
#if (POINT_LIGHT_COUNT > 0)
|
||||
varying vec3 v_vertexToPointLightDirection[POINT_LIGHT_COUNT];
|
||||
out vec3 v_vertexToPointLightDirection[POINT_LIGHT_COUNT];
|
||||
#endif
|
||||
|
||||
#if (SPOT_LIGHT_COUNT > 0)
|
||||
varying vec3 v_vertexToSpotLightDirection[SPOT_LIGHT_COUNT];
|
||||
out vec3 v_vertexToSpotLightDirection[SPOT_LIGHT_COUNT];
|
||||
#endif
|
||||
|
||||
#if defined(SPECULAR)
|
||||
varying vec3 v_cameraDirection;
|
||||
out vec3 v_cameraDirection;
|
||||
#endif
|
||||
|
||||
#include "lighting.vert"
|
||||
|
@ -112,7 +112,7 @@ varying vec3 v_cameraDirection;
|
|||
#endif
|
||||
|
||||
#if defined(CLIP_PLANE)
|
||||
varying float v_clipDistance;
|
||||
out float v_clipDistance;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
|
|
|
@ -84,35 +84,35 @@ vec4 _baseColor;
|
|||
out vec4 _fragColor;
|
||||
///////////////////////////////////////////////////////////
|
||||
// Varyings
|
||||
varying vec2 v_texCoord;
|
||||
in vec2 v_texCoord;
|
||||
|
||||
#if defined(LIGHTMAP)
|
||||
varying vec2 v_texCoord1;
|
||||
in vec2 v_texCoord1;
|
||||
#endif
|
||||
|
||||
#if defined(LIGHTING)
|
||||
|
||||
#if !defined(BUMPED)
|
||||
varying vec3 v_normalVector;
|
||||
in vec3 v_normalVector;
|
||||
#endif
|
||||
|
||||
#if defined(BUMPED) && (DIRECTIONAL_LIGHT_COUNT > 0)
|
||||
varying vec3 v_directionalLightDirection[DIRECTIONAL_LIGHT_COUNT];
|
||||
in vec3 v_directionalLightDirection[DIRECTIONAL_LIGHT_COUNT];
|
||||
#endif
|
||||
|
||||
#if (POINT_LIGHT_COUNT > 0)
|
||||
varying vec3 v_vertexToPointLightDirection[POINT_LIGHT_COUNT];
|
||||
in vec3 v_vertexToPointLightDirection[POINT_LIGHT_COUNT];
|
||||
#endif
|
||||
|
||||
#if (SPOT_LIGHT_COUNT > 0)
|
||||
varying vec3 v_vertexToSpotLightDirection[SPOT_LIGHT_COUNT];
|
||||
in vec3 v_vertexToSpotLightDirection[SPOT_LIGHT_COUNT];
|
||||
#if defined(BUMPED)
|
||||
varying vec3 v_spotLightDirection[SPOT_LIGHT_COUNT];
|
||||
in vec3 v_spotLightDirection[SPOT_LIGHT_COUNT];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SPECULAR)
|
||||
varying vec3 v_cameraDirection;
|
||||
in vec3 v_cameraDirection;
|
||||
#endif
|
||||
|
||||
#include "lighting.frag"
|
||||
|
@ -120,11 +120,11 @@ varying vec3 v_cameraDirection;
|
|||
#endif
|
||||
|
||||
#if defined(CLIP_PLANE)
|
||||
varying float v_clipDistance;
|
||||
in float v_clipDistance;
|
||||
#endif
|
||||
|
||||
#if defined(FOG)
|
||||
varying vec4 viewSpace;
|
||||
in vec4 viewSpace;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
|
|
|
@ -13,25 +13,25 @@
|
|||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Atributes
|
||||
attribute vec4 a_position;
|
||||
in vec4 a_position;
|
||||
|
||||
#if defined(SKINNING)
|
||||
attribute vec4 a_blendWeights;
|
||||
attribute vec4 a_blendIndices;
|
||||
in vec4 a_blendWeights;
|
||||
in vec4 a_blendIndices;
|
||||
#endif
|
||||
|
||||
attribute vec2 a_texCoord;
|
||||
in vec2 a_texCoord;
|
||||
|
||||
#if defined(LIGHTMAP)
|
||||
attribute vec2 a_texCoord1;
|
||||
in vec2 a_texCoord1;
|
||||
#endif
|
||||
|
||||
#if defined(LIGHTING)
|
||||
attribute vec3 a_normal;
|
||||
in vec3 a_normal;
|
||||
|
||||
#if defined(BUMPED)
|
||||
attribute vec3 a_tangent;
|
||||
attribute vec3 a_binormal;
|
||||
in vec3 a_tangent;
|
||||
in vec3 a_binormal;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -92,35 +92,35 @@ uniform vec4 u_clipPlane;
|
|||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Varyings
|
||||
varying vec2 v_texCoord;
|
||||
out vec2 v_texCoord;
|
||||
|
||||
#if defined(LIGHTMAP)
|
||||
varying vec2 v_texCoord1;
|
||||
out vec2 v_texCoord1;
|
||||
#endif
|
||||
|
||||
#if defined(LIGHTING)
|
||||
|
||||
#if !defined(BUMPED)
|
||||
varying vec3 v_normalVector;
|
||||
out vec3 v_normalVector;
|
||||
#endif
|
||||
|
||||
#if defined(BUMPED) && (DIRECTIONAL_LIGHT_COUNT > 0)
|
||||
varying vec3 v_directionalLightDirection[DIRECTIONAL_LIGHT_COUNT];
|
||||
out vec3 v_directionalLightDirection[DIRECTIONAL_LIGHT_COUNT];
|
||||
#endif
|
||||
|
||||
#if (POINT_LIGHT_COUNT > 0)
|
||||
varying vec3 v_vertexToPointLightDirection[POINT_LIGHT_COUNT];
|
||||
out vec3 v_vertexToPointLightDirection[POINT_LIGHT_COUNT];
|
||||
#endif
|
||||
|
||||
#if (SPOT_LIGHT_COUNT > 0)
|
||||
varying vec3 v_vertexToSpotLightDirection[SPOT_LIGHT_COUNT];
|
||||
out vec3 v_vertexToSpotLightDirection[SPOT_LIGHT_COUNT];
|
||||
#if defined(BUMPED)
|
||||
varying vec3 v_spotLightDirection[SPOT_LIGHT_COUNT];
|
||||
out vec3 v_spotLightDirection[SPOT_LIGHT_COUNT];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SPECULAR)
|
||||
varying vec3 v_cameraDirection;
|
||||
out vec3 v_cameraDirection;
|
||||
#endif
|
||||
|
||||
#include "lighting.vert"
|
||||
|
@ -134,11 +134,11 @@ varying vec3 v_cameraDirection;
|
|||
#endif
|
||||
|
||||
#if defined(CLIP_PLANE)
|
||||
varying float v_clipDistance;
|
||||
out float v_clipDistance;
|
||||
#endif
|
||||
|
||||
#if defined(FOG)
|
||||
varying vec4 viewSpace;
|
||||
out vec4 viewSpace;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
|
|
Loading…
Reference in New Issue