-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the code is not working with new versions of Cesium (webgl2 Update in cesium) #73
Comments
I'm also interessted in getting the code working with webgl2 but I am completely overwhelmed with the code. |
According to the document, you should be able to force Cesium to use WebGL1.
If you really need to use WebGL2, then the old WebGL1 code need to be rewritten |
The VcOverlayWindmap component in vue-cesium utilizes 3D-Wind-Field and includes compatibility adjustments for the relevant GLSL, supporting both WebGL1 and WebGL2. Here is the demo link: https://zouyaoji.top/vue-cesium/#/en-US/component/overlays/vc-overlay-windmap. Feel free to use it as needed. If you're interested in the specific implementation details, please refer to the vue-cesium source code. You can find it here: vue-cesium source code - particlesRendering.ts |
Thank you Rayman, I try to use your framework to display global ocean currents. I'll work on it. Thanks again, Jörg |
Good evening,
I am facing an issue due to monthly Cesium update (ver 1.101) and I report the following console messages:
Cesium.js:92 [Cesium WebGL] Fragment shader source:
#version 300 es
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
precision highp int;
#else
precision mediump float;
precision mediump int;
#define highp mediump
#endif
#define OES_texture_float_linear
#define OES_texture_float
#line 0
#line 0
uniform sampler2D U;
uniform sampler2D V;
uniform sampler2D currentParticlesPosition;
uniform vec3 dimension;
uniform vec3 minimum;
uniform vec3 maximum;
uniform vec3 interval;
uniform vec2 uSpeedRange;
uniform vec2 vSpeedRange;
uniform float pixelSize;
uniform float speedFactor;
float speedScaleFactor = speedFactor * pixelSize;
varying vec2 v_textureCoordinates;
vec2 mapPositionToNormalizedIndex2D(vec3 lonLatLev) {
}
float getWindComponent(sampler2D componentTexture, vec3 lonLatLev) {
vec2 normalizedIndex2D = mapPositionToNormalizedIndex2D(lonLatLev);
float result = texture2D(componentTexture, normalizedIndex2D).r;
return result;
}
float interpolateTexture(sampler2D componentTexture, vec3 lonLatLev) {
float lon = lonLatLev.x;
float lat = lonLatLev.y;
float lev = lonLatLev.z;
}
vec3 linearInterpolation(vec3 lonLatLev) {
}
vec2 lengthOfLonLat(vec3 lonLatLev) {
}
vec3 convertSpeedUnitToLonLat(vec3 lonLatLev, vec3 speed) {
vec2 lonLatLength = lengthOfLonLat(lonLatLev);
float u = speed.x / lonLatLength.x;
float v = speed.y / lonLatLength.y;
float w = 0.0;
vec3 windVectorInLonLatLev = vec3(u, v, w);
}
vec3 calculateSpeedByRungeKutta2(vec3 lonLatLev) {
}
float calculateWindNorm(vec3 speed) {
vec3 percent = vec3(0.0);
percent.x = (speed.x - uSpeedRange.x) / (uSpeedRange.y - uSpeedRange.x);
percent.y = (speed.y - vSpeedRange.x) / (vSpeedRange.y - vSpeedRange.x);
float norm = length(percent);
}
void main() {
}
Cesium.js:12052 An error occurred while rendering. Rendering has stopped.
RuntimeError: Fragment shader failed to compile. Compile log: ERROR: 0:16: '=' : global variable initializers must be constant expressions
ERROR: 0:18: 'varying' : Illegal use of reserved word
I guess the .frag files are not updated with the new versions of Cesium, do you have any suggestion to fix the issue?.
Thank you in advance.
The text was updated successfully, but these errors were encountered: