mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-02 16:59:37 -05:00
Rename TextureTile to Tile in shader for better correspondance with its CPU counterpart
This commit is contained in:
@@ -22,34 +22,34 @@
|
||||
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
||||
****************************************************************************************/
|
||||
|
||||
#include <${MODULE_GLOBEBROWSING}/shaders/texturetile.hglsl>
|
||||
#include <${MODULE_GLOBEBROWSING}/shaders/tile.hglsl>
|
||||
#include <${MODULE_GLOBEBROWSING}/shaders/texturetilemapping.hglsl>
|
||||
#include "PowerScaling/powerScaling_fs.hglsl"
|
||||
|
||||
#include "fragment.glsl"
|
||||
|
||||
#if USE_COLORTEXTURE
|
||||
uniform TextureTile colorTiles[NUMLAYERS_COLORTEXTURE];
|
||||
uniform TextureTile colorTilesParent1[NUMLAYERS_COLORTEXTURE];
|
||||
uniform TextureTile colorTilesParent2[NUMLAYERS_COLORTEXTURE];
|
||||
uniform Tile colorTiles[NUMLAYERS_COLORTEXTURE];
|
||||
uniform Tile colorTilesParent1[NUMLAYERS_COLORTEXTURE];
|
||||
uniform Tile colorTilesParent2[NUMLAYERS_COLORTEXTURE];
|
||||
#endif // USE_COLORTEXTURE
|
||||
|
||||
#if USE_NIGHTTEXTURE
|
||||
uniform TextureTile nightTiles[NUMLAYERS_NIGHTTEXTURE];
|
||||
uniform TextureTile nightTilesParent1[NUMLAYERS_NIGHTTEXTURE];
|
||||
uniform TextureTile nightTilesParent2[NUMLAYERS_NIGHTTEXTURE];
|
||||
uniform Tile nightTiles[NUMLAYERS_NIGHTTEXTURE];
|
||||
uniform Tile nightTilesParent1[NUMLAYERS_NIGHTTEXTURE];
|
||||
uniform Tile nightTilesParent2[NUMLAYERS_NIGHTTEXTURE];
|
||||
#endif // USE_NIGHTTEXTURE
|
||||
|
||||
#if USE_OVERLAY
|
||||
uniform TextureTile overlayTiles[NUMLAYERS_OVERLAY];
|
||||
uniform TextureTile overlayTilesParent1[NUMLAYERS_OVERLAY];
|
||||
uniform TextureTile overlayTilesParent2[NUMLAYERS_OVERLAY];
|
||||
uniform Tile overlayTiles[NUMLAYERS_OVERLAY];
|
||||
uniform Tile overlayTilesParent1[NUMLAYERS_OVERLAY];
|
||||
uniform Tile overlayTilesParent2[NUMLAYERS_OVERLAY];
|
||||
#endif // USE_OVERLAY
|
||||
|
||||
#if USE_WATERMASK
|
||||
uniform TextureTile waterTiles[NUMLAYERS_WATERMASK];
|
||||
uniform TextureTile waterTilesParent1[NUMLAYERS_WATERMASK];
|
||||
uniform TextureTile waterTilesParent2[NUMLAYERS_WATERMASK];
|
||||
uniform Tile waterTiles[NUMLAYERS_WATERMASK];
|
||||
uniform Tile waterTilesParent1[NUMLAYERS_WATERMASK];
|
||||
uniform Tile waterTilesParent2[NUMLAYERS_WATERMASK];
|
||||
#endif // USE_WATERMASK
|
||||
|
||||
#if USE_ATMOSPHERE
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "PowerScaling/powerScaling_vs.hglsl"
|
||||
#include <${MODULE_GLOBEBROWSING}/shaders/ellipsoid.hglsl>
|
||||
#include <${MODULE_GLOBEBROWSING}/shaders/texturetile.hglsl>
|
||||
#include <${MODULE_GLOBEBROWSING}/shaders/tile.hglsl>
|
||||
#include <${MODULE_GLOBEBROWSING}/shaders/texturetilemapping.hglsl>
|
||||
|
||||
uniform mat4 modelViewProjectionTransform;
|
||||
@@ -40,9 +40,9 @@ uniform int xSegments;
|
||||
uniform float skirtLength;
|
||||
|
||||
#if USE_HEIGHTMAP
|
||||
uniform TextureTile heightTiles[NUMLAYERS_HEIGHTMAP];
|
||||
uniform TextureTile heightTilesParent1[NUMLAYERS_HEIGHTMAP];
|
||||
uniform TextureTile heightTilesParent2[NUMLAYERS_HEIGHTMAP];
|
||||
uniform Tile heightTiles[NUMLAYERS_HEIGHTMAP];
|
||||
uniform Tile heightTilesParent1[NUMLAYERS_HEIGHTMAP];
|
||||
uniform Tile heightTilesParent2[NUMLAYERS_HEIGHTMAP];
|
||||
#endif // USE_HEIGHTMAP
|
||||
|
||||
uniform vec3 cameraPosition;
|
||||
|
||||
@@ -22,33 +22,33 @@
|
||||
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
||||
****************************************************************************************/
|
||||
|
||||
#include <${MODULE_GLOBEBROWSING}/shaders/texturetile.hglsl>
|
||||
#include <${MODULE_GLOBEBROWSING}/shaders/tile.hglsl>
|
||||
#include <${MODULE_GLOBEBROWSING}/shaders/texturetilemapping.hglsl>
|
||||
#include "PowerScaling/powerScaling_fs.hglsl"
|
||||
#include "fragment.glsl"
|
||||
|
||||
#if USE_COLORTEXTURE
|
||||
uniform TextureTile colorTiles[NUMLAYERS_COLORTEXTURE];
|
||||
uniform TextureTile colorTilesParent1[NUMLAYERS_COLORTEXTURE];
|
||||
uniform TextureTile colorTilesParent2[NUMLAYERS_COLORTEXTURE];
|
||||
uniform Tile colorTiles[NUMLAYERS_COLORTEXTURE];
|
||||
uniform Tile colorTilesParent1[NUMLAYERS_COLORTEXTURE];
|
||||
uniform Tile colorTilesParent2[NUMLAYERS_COLORTEXTURE];
|
||||
#endif // USE_COLORTEXTURE
|
||||
|
||||
#if USE_NIGHTTEXTURE
|
||||
uniform TextureTile nightTiles[NUMLAYERS_NIGHTTEXTURE];
|
||||
uniform TextureTile nightTilesParent1[NUMLAYERS_NIGHTTEXTURE];
|
||||
uniform TextureTile nightTilesParent2[NUMLAYERS_NIGHTTEXTURE];
|
||||
uniform Tile nightTiles[NUMLAYERS_NIGHTTEXTURE];
|
||||
uniform Tile nightTilesParent1[NUMLAYERS_NIGHTTEXTURE];
|
||||
uniform Tile nightTilesParent2[NUMLAYERS_NIGHTTEXTURE];
|
||||
#endif // USE_NIGHTTEXTURE
|
||||
|
||||
#if USE_OVERLAY
|
||||
uniform TextureTile overlayTiles[NUMLAYERS_OVERLAY];
|
||||
uniform TextureTile overlayTilesParent1[NUMLAYERS_OVERLAY];
|
||||
uniform TextureTile overlayTilesParent2[NUMLAYERS_OVERLAY];
|
||||
uniform Tile overlayTiles[NUMLAYERS_OVERLAY];
|
||||
uniform Tile overlayTilesParent1[NUMLAYERS_OVERLAY];
|
||||
uniform Tile overlayTilesParent2[NUMLAYERS_OVERLAY];
|
||||
#endif // USE_OVERLAY
|
||||
|
||||
#if USE_WATERMASK
|
||||
uniform TextureTile waterTiles[NUMLAYERS_WATERMASK];
|
||||
uniform TextureTile waterTilesParent1[NUMLAYERS_WATERMASK];
|
||||
uniform TextureTile waterTilesParent2[NUMLAYERS_WATERMASK];
|
||||
uniform Tile waterTiles[NUMLAYERS_WATERMASK];
|
||||
uniform Tile waterTilesParent1[NUMLAYERS_WATERMASK];
|
||||
uniform Tile waterTilesParent2[NUMLAYERS_WATERMASK];
|
||||
#endif // USE_WATERMASK
|
||||
|
||||
// tileInterpolationParameter is used to interpolate between a tile and its parent tiles
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "PowerScaling/powerScaling_vs.hglsl"
|
||||
#include <${MODULE_GLOBEBROWSING}/shaders/ellipsoid.hglsl>
|
||||
#include <${MODULE_GLOBEBROWSING}/shaders/texturetile.hglsl>
|
||||
#include <${MODULE_GLOBEBROWSING}/shaders/tile.hglsl>
|
||||
#include <${MODULE_GLOBEBROWSING}/shaders/texturetilemapping.hglsl>
|
||||
|
||||
#define NUMLAYERS_COLORTEXTURE #{lastLayerIndexColor} + 1
|
||||
@@ -42,9 +42,9 @@ uniform vec3 p11;
|
||||
uniform vec3 patchNormalCameraSpace;
|
||||
|
||||
#if USE_HEIGHTMAP
|
||||
uniform TextureTile heightTiles[NUMLAYERS_HEIGHTMAP];
|
||||
uniform TextureTile heightTilesParent1[NUMLAYERS_HEIGHTMAP];
|
||||
uniform TextureTile heightTilesParent2[NUMLAYERS_HEIGHTMAP];
|
||||
uniform Tile heightTiles[NUMLAYERS_HEIGHTMAP];
|
||||
uniform Tile heightTilesParent1[NUMLAYERS_HEIGHTMAP];
|
||||
uniform Tile heightTilesParent2[NUMLAYERS_HEIGHTMAP];
|
||||
#endif // USE_HEIGHTMAP
|
||||
|
||||
uniform int xSegments;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifndef TEXTURETILEMAPPING_HGLSL
|
||||
#define TEXTURETILEMAPPING_HGLSL
|
||||
|
||||
#include <${MODULE_GLOBEBROWSING}/shaders/texturetile.hglsl>
|
||||
#include <${MODULE_GLOBEBROWSING}/shaders/tile.hglsl>
|
||||
#include <${MODULE_GLOBEBROWSING}/shaders/blending.hglsl>
|
||||
|
||||
// First layer type from LayeredTextureShaderProvider is height map
|
||||
@@ -101,9 +101,9 @@
|
||||
float calculateHeight(
|
||||
const vec2 uv,
|
||||
const float tileInterpolationParameter,
|
||||
const TextureTile heightTiles[NUMLAYERS_HEIGHTMAP],
|
||||
const TextureTile heightTilesParent1[NUMLAYERS_HEIGHTMAP],
|
||||
const TextureTile heightTilesParent2[NUMLAYERS_HEIGHTMAP]) {
|
||||
const Tile heightTiles[NUMLAYERS_HEIGHTMAP],
|
||||
const Tile heightTilesParent1[NUMLAYERS_HEIGHTMAP],
|
||||
const Tile heightTilesParent2[NUMLAYERS_HEIGHTMAP]) {
|
||||
|
||||
float height = 0;
|
||||
|
||||
@@ -137,9 +137,9 @@ float calculateHeight(
|
||||
vec4 calculateColor(
|
||||
const vec2 uv,
|
||||
const float tileInterpolationParameter,
|
||||
const TextureTile colorTiles[NUMLAYERS_COLORTEXTURE],
|
||||
const TextureTile colorTilesParent1[NUMLAYERS_COLORTEXTURE],
|
||||
const TextureTile colorTilesParent2[NUMLAYERS_COLORTEXTURE]) {
|
||||
const Tile colorTiles[NUMLAYERS_COLORTEXTURE],
|
||||
const Tile colorTilesParent1[NUMLAYERS_COLORTEXTURE],
|
||||
const Tile colorTilesParent2[NUMLAYERS_COLORTEXTURE]) {
|
||||
|
||||
vec4 color = vec4(0);
|
||||
|
||||
@@ -173,9 +173,9 @@ vec4 calculateNight(
|
||||
const vec4 currentColor,
|
||||
const vec2 uv,
|
||||
const float tileInterpolationParameter,
|
||||
const TextureTile nightTiles[NUMLAYERS_NIGHTTEXTURE],
|
||||
const TextureTile nightTilesParent1[NUMLAYERS_NIGHTTEXTURE],
|
||||
const TextureTile nightTilesParent2[NUMLAYERS_NIGHTTEXTURE],
|
||||
const Tile nightTiles[NUMLAYERS_NIGHTTEXTURE],
|
||||
const Tile nightTilesParent1[NUMLAYERS_NIGHTTEXTURE],
|
||||
const Tile nightTilesParent2[NUMLAYERS_NIGHTTEXTURE],
|
||||
const vec3 ellipsoidNormalCameraSpace) {
|
||||
|
||||
vec3 lightDirection = normalize(vec3(-1,-1,-1));
|
||||
@@ -216,9 +216,9 @@ vec4 calculateOverlay(
|
||||
const vec4 currentColor,
|
||||
const vec2 uv,
|
||||
const float tileInterpolationParameter,
|
||||
const TextureTile overlayTiles[NUMLAYERS_OVERLAY],
|
||||
const TextureTile overlayTilesParent1[NUMLAYERS_OVERLAY],
|
||||
const TextureTile overlayTilesParent2[NUMLAYERS_OVERLAY]) {
|
||||
const Tile overlayTiles[NUMLAYERS_OVERLAY],
|
||||
const Tile overlayTilesParent1[NUMLAYERS_OVERLAY],
|
||||
const Tile overlayTilesParent2[NUMLAYERS_OVERLAY]) {
|
||||
|
||||
vec4 color = currentColor;
|
||||
|
||||
@@ -252,9 +252,9 @@ vec4 calculateWater(
|
||||
const vec4 currentColor,
|
||||
const vec2 uv,
|
||||
const float tileInterpolationParameter,
|
||||
const TextureTile waterTiles[NUMLAYERS_WATERMASK],
|
||||
const TextureTile waterTilesParent1[NUMLAYERS_WATERMASK],
|
||||
const TextureTile waterTilesParent2[NUMLAYERS_WATERMASK]) {
|
||||
const Tile waterTiles[NUMLAYERS_WATERMASK],
|
||||
const Tile waterTilesParent1[NUMLAYERS_WATERMASK],
|
||||
const Tile waterTilesParent2[NUMLAYERS_WATERMASK]) {
|
||||
|
||||
vec4 waterColor = vec4(0,0,0,0);
|
||||
|
||||
|
||||
+2
-2
@@ -35,7 +35,7 @@ struct TileUvTransform {
|
||||
vec2 uvScale;
|
||||
};
|
||||
|
||||
struct TextureTile {
|
||||
struct Tile {
|
||||
sampler2D textureSampler;
|
||||
|
||||
TileDepthTransform depthTransform;
|
||||
@@ -50,7 +50,7 @@ vec4 patchBorderOverlay(vec2 uv, vec3 borderColor, float borderSize) {
|
||||
return vec4(color, 0);
|
||||
}
|
||||
|
||||
vec4 getTexVal(const TextureTile tile, const vec2 tileUV){
|
||||
vec4 getTexVal(const Tile tile, const vec2 tileUV){
|
||||
vec2 samplePos = tile.uvTransform.uvOffset + tile.uvTransform.uvScale * tileUV;
|
||||
vec4 texVal = texture(tile.textureSampler, samplePos);
|
||||
return texVal;
|
||||
Reference in New Issue
Block a user