diff --git a/ext/ghoul b/ext/ghoul index ba88e7fb74..ef1063b4af 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit ba88e7fb74a17fc00a698f6ecb6ac3640cb14472 +Subproject commit ef1063b4afb99826e7c254b2e7f9ed79f5bd600c diff --git a/modules/base/shaders/screnspace_fs.glsl b/modules/base/shaders/screnspace_fs.glsl index ad7a750781..1f8a8966f3 100644 --- a/modules/base/shaders/screnspace_fs.glsl +++ b/modules/base/shaders/screnspace_fs.glsl @@ -39,7 +39,7 @@ Fragment getFragment(){ // power scale coordinates for depth. w value is set to 1.0. float depth = (1.0 + log(abs(OcclusionDepth) + 1/pow(k, 1.0))/log(k)) / 27.0; - frag.color = texture(texture1, vs_st); + frag.color = texture(texture1, vec2(vs_st.s, 1-vs_st.t)); frag.color.a = (frag.color.a != 0.0f) ? Alpha : frag.color.a; if(frag.color.a == 0.0f){ discard; diff --git a/modules/iswa/rendering/dataplane.cpp b/modules/iswa/rendering/dataplane.cpp index d7766e8dfa..36d0a5bb81 100644 --- a/modules/iswa/rendering/dataplane.cpp +++ b/modules/iswa/rendering/dataplane.cpp @@ -376,7 +376,7 @@ void DataPlane::loadTexture() { void DataPlane::updateTexture(){ _memorybuffer = ""; - std::shared_ptr future = ISWAManager::ref().downloadDataToMemory(2, _memorybuffer); + std::shared_ptr future = ISWAManager::ref().downloadDataToMemory(-_data->id, _memorybuffer); if(future){ _futureData = future; diff --git a/modules/iswa/shaders/cygnetplane_fs.glsl b/modules/iswa/shaders/cygnetplane_fs.glsl index f5a21a87f8..0df9996a11 100644 --- a/modules/iswa/shaders/cygnetplane_fs.glsl +++ b/modules/iswa/shaders/cygnetplane_fs.glsl @@ -35,7 +35,7 @@ Fragment getFragment() { vec4 position = vs_position; float depth = pscDepth(position); vec4 diffuse; - diffuse = texture(texture1, vs_st); + diffuse = texture(texture1, vec2(vs_st.s, 1-vs_st.t)); //vec4 diffuse = vec4(1,vs_st,1); //vec4 diffuse = vec4(1,0,0,1); diff --git a/modules/iswa/shaders/dataplane_fs.glsl b/modules/iswa/shaders/dataplane_fs.glsl index 16a5174827..0da2e62fdd 100644 --- a/modules/iswa/shaders/dataplane_fs.glsl +++ b/modules/iswa/shaders/dataplane_fs.glsl @@ -41,7 +41,7 @@ Fragment getFragment() { float depth = pscDepth(position); vec4 diffuse; // diffuse = top; - diffuse = texture(texture1, vs_st); + diffuse = texture(texture1, vec2(vs_st.s, 1-vs_st.t)); //float v = texture(texture1, vs_st).r; //float x = tfValues.x; //float y = tfValues.y; diff --git a/modules/iswa/util/iswamanager.cpp b/modules/iswa/util/iswamanager.cpp index 1f8a5822df..4243940528 100644 --- a/modules/iswa/util/iswamanager.cpp +++ b/modules/iswa/util/iswamanager.cpp @@ -219,10 +219,10 @@ namespace openspace{ void ISWAManager::update(){ for (auto it = _metaFutures.begin(); it != _metaFutures.end(); ){ if((*it)->isFinished) { - if((*it)->type == "TEXTURE"){ - createPlane((*it)->id,(*it)->json,std::string("TexturePlane")); - }else{ + if((*it)->type == "DATA"){ createPlane((*it)->id,(*it)->json,std::string("DataPlane")); + }else{ + createPlane((*it)->id,(*it)->json,std::string("TexturePlane")); } it = _metaFutures.erase( it );